|
I don't know, but download Firebug for Firefox. It's an add-in that gives you javascript debugging in FF, it's invaluable.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for the reply Christian.
I am trying to find a download site suitable for windows but have not been able to so far.
I remember having firebug installed on a previous system so I know there are such places. Do you know where I can download firebug for installation on a windows platform?
|
|
|
|
|
|
Thanks Ed. I installed it and now I am really confused.
According to Firebug the transaction is executing properly and I am receiving the proper response.
There are no errors apparent (I am not quite sure what I am looking for) and the transaction returns the expected data. I tried a few different posts and each returned the proper data for the parms I passed.
The only problem is that I never receive a state change in the assigned state change handler so I don't know when the transaction completes.
Thanks for pointing me to the firebug site. At least now I know the transaction is completing properly.
Would you have any insight into why the state change handler is not getting signaled?
|
|
|
|
|
JimmyRopes wrote: Would you have any insight into why the state change handler is not getting signaled?
Without seeing the code involved the only thing I can think of (I'm by no means a JS / Web guru) would be have you spelt the handler wrong? I know, I know, but I've been bitten by this before.
|
|
|
|
|
Ed.Poore wrote: have you spelt the handler wrong
If I did it wouldn't work in IE and Opera. I am not saying that I am above doing something like this but unless I unknowingly have the clairvoyant versions of IE and Opera I would expect them to choke also.
Here is the code. Let me know if you can spot anything.
<br />
var HTTPREQUEST_UNINITIALIZED = 0;<br />
var HTTPREQUEST_LOADING = 1;<br />
var HTTPREQUEST_LOADED = 2;<br />
var HTTPREQUEST_INTERACTIVE = 3;<br />
var HTTPREQUEST_COMPLETED = 4;<br />
var HTTPREQUEST_SUCCESS = 200;<br />
<br />
Request = new getXMLHttpRequest();<br />
Request.onreadystatechange = StateChangeHandler;<br />
var data = '';<br />
<br />
Request.abort();<br />
var path = "<?php echo $_ENV['SCRIPT_URI']; ?>";<br />
path = path.substring(0, path.lastIndexOf('/') + 1) + "getHood.php";<br />
Request.open("post", path, true);<br />
Request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");<br />
data = "City=" + city<br />
+ "&State=" + state;<br />
Request.send(data);<br />
}
<br />
function StateChangeHandler(){<br />
if (HTTPREQUEST_COMPLETED == Request.readyState){<br />
if (HTTPREQUEST_SUCCESS == Request.status){<br />
~~~~~~~~~~~~~~ Code here to handle the response ~~~~~~~~~~~~~~~~~~~~~~~<br />
}
else{<br />
alert("Error: HTTP "<br />
+ Request.status<br />
+ " "<br />
+ Request.statusText<br />
+ " Please contact our WebMaster from the link on our Contact Us page explaining the error you received. Thank you.");<br />
}
}
}
<br />
|
|
|
|
|
Sorry, I couldn't see anything of note.
|
|
|
|
|
I decided to make the call synchronous (changing the third parameter to false and getting the response after the send returns) until I can get this figured out.
At least I can get the code out to the client satisfying the basic requirements of updating the control but it is not ideal because it locks the screen for approximately a second (650 - 1025 milliseconds on average) before updating.
I have to believe that this is a very basic problem with FF so I will take it up on a Mozilla forum.
Thanks for taking the time to look at the code.
|
|
|
|
|
JimmyRopes wrote: Request.abort();
Try assigning the onreadystatechange handler after this call (i assume you're caching the XMLHttpRequest object somewhere).
---- I don't care what you consider witty, but at least I do not blather on posting nonsense like Jim Crafton.-- Stringcheese, humbled by Crafton's ability to string together multiple sentences
|
|
|
|
|
Shog9 wrote: JimmyRopes wrote:
Request.abort();
Try assigning the onreadystatechange handler after this call
Good catch! The abort call is defensive coding from a different script I happened to copy which fired on a timer event updating a database and didn't return data so it worked on all browsers.
In this script I am returning data so I need to catch signals to know when the transaction completed.
Needless to say it would be good if all browsers worked consistently but that will never happen. Thank you for the help.
|
|
|
|
|
Hi all!
i wanna display the polling results in a graph on my website and i need code for this in C#.(values will be stored in database against 3 options: Yes, No, Don't know).
looking 4 ur help
|
|
|
|
|
You're basically going to draw your graph using standard GDI+ code, then push that image down to the browser.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi.
When i type the following script the code works fine (where 'purchaseButton' is the name of the button and 'paycontinue' is the name of the form:
var but = document.getElementById('purchaseButton');<br />
but.innerHTML = 'Processing, Please wait..';<br />
document.getElementById('closeButton').disabled = true;<br />
document.forms['paycontinue'].submit();<br />
but when i add the line: but.disabled = true; before the submit command, IE will successfully submit the form, but FireFox will not continue after disabling the button.
Any one know any code to disable a button in a form (not a submit button, just a normal button) and then submit the form?
|
|
|
|
|
use following function for getting the element in Firefox
document.documentElement
Best Regards,
Chetan Patel
|
|
|
|
|
Thanks for you reply
But The form submits fine with FireFox also, but not when the button is disabled before submitting the form.
Why would document.documentElement come to use?
|
|
|
|
|
Hi Friends..
Is there any way to place a image over a HTML button..?
If possible.,how to do it..?
what attribute shoule be added..?
Regards,
Balaguru
|
|
|
|
|
What exactly do you mean when you want an image "over" a button? Do you want it above the button or on top of the button?
If you want an image above the button, just put an img tag before the button. If you put an image on top of the button, why would you want the button there at all?
If you don't want a separate image at all, but want the button to show an image, use an input with type="image".
---
single minded; short sighted; long gone;
|
|
|
|
|
if you want to show a button with an image you can use the css attribute background-image. it could look like this:
.input [type="button"]{
background-image:...
}
|
|
|
|
|
Hi Balagurunathan,
I am not sure if this will help. If you are using ASP.NET you can use an ImageButton[^].
Otherwise, there's a Image Button Tutorial[^] that shows how to implement an image that has the same effect as a submit button. It includes an example too.
Hope this helps.
-- bruce
Microsoft ISV Advisor
For the latest information for independent software vendors (ISV's) see http://blogs.msdn.com/usisvde
|
|
|
|
|
Hi...am very new to Webkit..I have been trying to perform the following
actions::
->Downloading a web-page content using winhttp(the html file and the
required image files are stored in a folder)..
->rendering the web-page(stored in the folder i.e step1) on the safari
browser using the webkit rendering engine...
The first operation am succesful in doing...however, i have no idea on how
to go about the 2nd step i.e using webkit for rendering this stored data on
safari browser...can someone there please help me..Thanks in advance...
Will try to elaborate...
For ex:lets take the google homepage..Am downloading the google.html file and the relevant images also(i.e images on the google page..All this using winhttp) and storing all these in a folder....
Now, i have installed webkit...i want to use the webkit engine i have installed to run the safari browser and render this content...(and not just clicking on the page and opening it on safari browser.This uses the rendering engine ported alongwith the safari browser..I want to use the rendering engine of webkit i have installed)...Hope u got me...Need help badly...
|
|
|
|
|
Do any of you have Visual Studio on your production server?
It seems like a pretty fast way to make modifications to me, but perhaps there's something I'm missing.
Thanks!
John Held
|
|
|
|
|
You'd be missing security for one thing.
You should assume that at some point a production web server, aka a sacrifcial lamb, will be breached. Would you want black hats to have access to your source code and publishing rights?
|
|
|
|
|
Good point!
I would think that one would have to log in to the webserver itself, though to do anything to the code.
John Held
|
|
|
|
|
Yes, that is the first thing a hacker tries to do.
|
|
|
|
|
John Held wrote: Do any of you have Visual Studio on your production server
No. Neither does proper security guidelines advise that nor does the cost of another license allows that.
|
|
|
|