|
Try to put the function object in the event instead of in the page:
rectelem.removed = function() { alert('This is the test function!'); }
---
b { font-weight: normal; }
|
|
|
|
|
This only works if that element is on the same page as the function. My element and function that I want to be used for the element's onclick event, reside on the main page but I need to modify that function's code from the popup page.
|
|
|
|
|
Yes, I did some testing, and it appears that the anonymous function still belongs to the page where it is created, although the function is not declared in the page.
---
b { font-weight: normal; }
|
|
|
|
|
I came up with the following solution:
On the main page I have a function that takes a string and then executes that string as code using the eval function:
<br />
function execCode(codestring)<br />
{<br />
eval(codestring);<br />
}<br />
Then on the popup page I do the following to change the onclick event's code:
<br />
window.opener.execCode("window.document.getElementById('event2_2372').onclick = function() { alert('Modified event code!'); };");<br />
This allows the "function()" assignment to take place in the address space of the main page thus giving it a valid entry point to the function.
If anyone has any tweaks or a better way to do this, please let me know. Thanks!
|
|
|
|
|
I am making a web site that I wish to be viewable by both a normal everyday PC and mobile devices(WM5, CE ect.)
The only way I know how to do it is to detect the browser type and go off that. Is there a way to do this without the wasted page?
Thanks in advance!
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
I've created a web service with an .asmx file that contains many <WebMethod()> functions that I can consume in other projects just fine. Is it possible to somehow share classes belonging to the web service that are not inside the .asmx file?
On the consuming end I would like to be able to declare and use the classes belonging to the web service e.g.
Dim Bleh as new ReferenceName.service.SomeClassBelongingToTheWebService
Bleh.ExecuteSomeFunction()
Bleh.SetSomeProperties = "SomeString"
Is this possible? I currently don't have access to any of the classes belonging to the web service and I have to place all functions inside of the service.asmx file. If I could access the classes belonging to the web service then I could use it to pass strong typed collections and keep my functions grouped accordingly. Thanks so much!
- Paul Anderson
|
|
|
|
|
Hi below is my hyperlink description in a datagrid
<<asp:hyperlink runat="server" text="<%#Container.DataItem("field1")%>" navigateurl="<%# "results.aspx?Param1=" & Server.UrlEncode(Container.DataItem("field1")) & "&Param2=" & Server.UrlEncode(Container.DataItem("field2"))%>">
Please note all the parameters are strings and i am displaying it in Results page so user can be cleaver and handcode the url parameter and print the value in the page.
how can i avoid user from doing this
please help
|
|
|
|
|
uglyeyes wrote: how can i avoid user from doing this
Simple, to avoid it you must not use it.
Use button instead to handle where you need to redirect the user from the server side.
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin
Edbert
Sydney, Australia
|
|
|
|
|
I've written a code that creates a receives the request, sent by the web browser(I use FireFox), and then it parses the request and set the headers of a WebRequest object and if it finds any information after the empty line, it writes the information in the WebRequest object, then I get a WebResponse object out of the WebRequest object and creates 2 byte arrays, then it reads the WebResponse stream and puts the data in the first byte array and then puts the Header information of the WebResponse in the second array using the ToByteArray method of the WebResponse's Header propety.
Then I have tried to methods for sending data to the web browser:
1)I have sent the Header array first in a separated Send method and then the Data array in a separated Send method after that, that makes the browser report the "Done" status and shows nothing!
2)I have added the data to the end of the header and sent them az a single Send method, that makes the browser show the html and css and jscript information but it leaves the places of the pictures empty!
Does anyone know, what should I do to fix this problem?
Should I send the header just if the data is in html/text format?
Or the Gip/Png/Jpg of Application data formats also need the header?
If they need, how to make the browser show the images and flashes?
Please help!
Sojaner!
|
|
|
|
|
Try checking your syntax.
|
|
|
|
|
Thats the help you supply? I'm sure you helped him very much.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
The response that you send back to the browser already has a header. If you want the header from the request that you got, you have to replace the current header, or extract the information from your header and add to the current header.
When the browser displays the page, all the addresses of the images are wrong, as the address of the page is not the same as the address where you fetched the page. If you want the browser to find the images, you have to parse the page to find the image tags, and put adjusted or absolute URLs in them. Any other external files that the page might use also has to be corrected, like CSS, Javascript, Flash files, et.c.
---
b { font-weight: normal; }
|
|
|
|
|
But the page shows the tables and other elements using the styles from the css files, I have even saved the page after loading it, and found out that the css files and even the small images are loaded, the only problem is with the bigger files. In fact I want to write 2 programs the are client and server, the server is on my website host and the client on is on my pc and I want these 2 to do the "Tunneling Job" for me!
I want the server to fetch the response of the web resources and send them to my PC hidden from my ISP!
If you know how to write a set of client and server programs can do the Tunneling task, please guide my through this!
I really need to do this!
Sojaner!
|
|
|
|
|
Let's say I have a specific margin set to the body of my HTML page. I do it through CSS like so:
body {
margin-left: 50px;
margin-right: 50px;
margin-top: 20px;
margin-bottom: 20px;
}
When this HTML gets printed, the margins seem to affect the print-out. Is there a way to fix this through CSS?
|
|
|
|
|
You could specify for which media you declare your CSS for.
Have a look at this[^] specification.
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin
Edbert
Sydney, Australia
|
|
|
|
|
First of all, I admit freely that I have little knowledge in internet technology.
I want to read in parts of a website using C++/MFC. Using CHttpFile.functions I'm already able to read the webpage into a file. BUT: The problem is, I have to type in my nickname and passwort to reach the data in my account on this website. Can somebody tell me what to do? Or give me a hint what book/article/tutorial to read?
thanks, Veikko.
Additional info:
I analysed the html-code the website returns and I think I found the piece of code that submits the data:
...
I guess that this calls a script on the server to have the subroutine "checkLogin()" executed. checkLogin() is a html-routine that is also available in the website's sourcecode; it reads the values from the edit boxes.
My problem is now: 1. how do I set the value of the edit box to my password and 2. how do I trigger that server-script from my C++ program?
|
|
|
|
|
Hi all,
Iam developing web application in C#.Net, VS 2005. In this, I want to use Print dialog box, to take the print out. Is there any facility available as in the case of Windows Form( drag and drop Dialog Controls from the tool box).
If source code is available, then it would be much helpful for me.
Kannapiran S
|
|
|
|
|
I want 2 disable "save as" option in file menu using javascript.
Do good and have good.
|
|
|
|
|
Well, to disable Save As, try looking here.
Or, if this doesn't work, you could always disable the right-click menu.
|
|
|
|
|
I use asp not .net
I want to know How to export file to pdf with asp
if you know introduce me if you have code it's very good
thank you
Preaw
|
|
|
|
|
I made a website in visual studio, but when i try to put it on my GoDaddy server, it gives me an error message. If you want to see the error message you can go www.mstermind1429.com. I don't post it in here, because i can't find the error message. I believe this is because GoDaddy does not have the asp.net server on it. If so could you tell me where to get that for free, and if not could you tell me what else is wrong with it? Thanks in advnace
PS. The website works perfectly on my local server.
|
|
|
|
|
That is not the error message itself, it's informational page. Do as it says, and you will see the actual error message.
---
b { font-weight: normal; }
|
|
|
|
|
Hi friends,
I have a problem in php. I installed and configured PHP 4 in a windows system running IIS. But I have a problem while running a php file as shown below.
Parse error: parse error, unexpected T_STRING in c:\inetpub\wwwroot\ph\ex.php on line 3
Please help me to solve the problem
de'mane
|
|
|
|
|
Standard question #3:
What does your code look like?
---
b { font-weight: normal; }
|
|
|
|
|
hi,
I've to deploy my newly made assembly to client but the problem is there are around 15 sites using old assembly.
Is there any way with which I'll put my assembly in GAC
....some sites will autmatically start using new assembly
....others will run on older ones.
Presetly there are not much site , only 15, so if there is any coding change should be done.
cheers
akhilesh
|
|
|
|