| | |
populating text field in firefox not working
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2008
Posts: 4
Reputation:
Solved Threads: 0
i have a simple url -
that passes the the variable in a javascript function -
the function then prints our the variable in a text field but it doesn't show in firefox -
my text field
any ideas?
thanks
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<a href="javascript:displayWindow('Slice 2100 (Commercial)');">SLICE 2100 (Commercial)</a>
that passes the the variable in a javascript function -
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<script language="javascript"> function displayWindow(url) { var w, h, l, t; var nc; w = 600; h = 409; l = screen.width/4; t = screen.height/4; nc = url; document.forms['SellSheet'].elements['sellitsheet'].value = nc; // no title // displayFloatingDiv('windowcontent', '', w, h, l, t); // with title displayFloatingDiv('windowcontent', 'Floating and Dimming Div', w, h, l, t); } </script>
the function then prints our the variable in a text field but it doesn't show in firefox -
my text field
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<input type="text" style="width: 292px" class="myTextBox" id="sellitsheet" />
any ideas?
thanks
This should work!
If not then try this reference guide @
http://developer.mozilla.org/en/The_DOM_and_JavaScript --
If not then try this reference guide @
http://developer.mozilla.org/en/The_DOM_and_JavaScript --
document.getElementsByTagName('form')['SellSheet'].elements['sellitsheet'].value = nc; •
•
Join Date: Sep 2008
Posts: 4
Reputation:
Solved Threads: 0
never mind - got it to work - i had to put the lind AFTER the call to my display function!
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
document.getElementsByTagName('form')['SellSheet'].elements['sellitsheet'].value = url;
This should do it!
If you still need anythin', just let me know. Good day...
If you still need anythin', just let me know. Good day...
html Syntax (Toggle Plain Text)
<html> <head> <title><!--Sample--></title>
css Syntax (Toggle Plain Text)
<style type="text/css"> <!-- a { text-decoration: none; } form input { border: none; } #screen { position: fixed; left: 10px; top: 10px; text-align: center; font-weight: bold; /* You may change the width and height if it is necessary. */ width: 200px; height: 40px; background-color: #C0C0C0; color: #A6A6A6; } --> </style>
javascript Syntax (Toggle Plain Text)
<script type="text/javascript"> <!-- function load() { thisLink = document.getElementById('link1'); thisLink.addEventListener('click', function displayWindow() { container = document.sellSheet.sellitsheet; screen = document.getElementsByTagName('div')[0]; screen.id = 'screen'; screen.firstChild.nodeValue = thisLink.title; container.value = thisLink.title; }, false ); } //--> </script>
html Syntax (Toggle Plain Text)
</head> <body onload="load();"> <p align="center"> <div> </div><br /><br /> <a id="link1" href="#" alt="" title="SLICE 2100 (Commercial)">SLICE 2100 (Commercial)</a><br /> <form name="sellSheet" action="#" onsubmit="return false;"> <input type="text" name="sellitsheet" size="20" value="" /> </form> </p> </body> </html>
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Ajax script not working on firefox
- Next Thread: how to access a folder using java script
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxexample ajaxjspservlets array blackjack browser captcha captchaformproblem cart child class close codes date debugger dependent developer disablefirebug dom editor element embed engine enter events explorer ext file firefox flash focus form forms frameworks game getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe java javascript javascripthelp2020 javascripts jquery jsf jsp jump libcurl listbox maps marquee masterpage math media menu object onerror onmouseoutdivproblem onmouseover onreadystatechange parent passing paypal pdf php position post programming prototype rated redirect safari scale scriptlets scroll search security size software sources star starrating stars stretch synchronous toggle tweet unicode variables web webservice window \n





