Hi,
I have created a web site connected to a database table... I have used the following script to connect two drop down menus but it doesnt work...i get an error at line :
eval('var option0 = new Option("- Please Choose -", "None")');
i am using procedure builder and i get a pls-00103 error. Encountered the symbol '"var"' when expected ....
could somebody understand why???
Hi,
all the javascript code is inside a PL/SQL string eclosed by apostrophes. If you want to use an apostroph inside the string, you have to double it:
eval(''var option0 = new Option("- Please Choose -", "None")'');
Ales The whole difference between a little boy and an adult man is the price of toys
well thnx, i did that and now i have no errors...it doesn t work though...do you think u could check it please???? I am really new to this and i cant find the mistake myself...:(
No errors?
I got "PLS-00201: identifier 'F_HOST' must be declared". I changed F_HOST to a string and then it compiled. Then I created the table war_membr, inserted "111" into column mem_type. After that I got a form and I attach the screenshot.
What do you mean by "doesn't work" ?
Ales The whole difference between a little boy and an adult man is the price of toys
well, first of all this is the procedure as currently used (attached)...
I have declared the host identifier in my package body thats why i dont get any errors like that. the thing is that i get a runtime error when i choose a category. my web site is: http://tiger.iso.port.ac.uk:7778/pls....memorial.home
u have to click on "find a memorial" to see it.
In addition, i m thinking that in my table the mem_type are written with spaces (ex. Stained Glass Window instead of Stained_Glass_Window as it appears in the javascript). But even when i tried the code only with the commented part (as u can see in the file) still it didnt work...hope this makes sense...
thnx
you might get expected results for plague and statue..but not for the rest...as the rest have array names as Stained_Glass_WindowArray,Foundation_StoneArray etc...with "UNDERSCORES" replacing "BLANK SPACES"..
well, i did what u told me and it almost works...! could you check it out once more please?? i get a new runtime error about the browser type (says it is undefined)
thnx again for your valuable help!!!
in addition, even if i put another option at the second drop down menu, and select that, the action does not work...(but if i don t use the first drop down at all it works fine!!) does it need to be handled in a different way when the first drop down is used as well or is it the runtime error that produces the problem...??
thnx
This is javascript related issue and I don't use javascript at all. I'm sorry.
If you want to debug a web page with javascript, save the page as .html file, modify the file and open it in the browser. After every change in the .html file just refresh the browser to see result.
Ales The whole difference between a little boy and an adult man is the price of toys