| | |
Automatically populate text box with browser info...
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I want some information about a browser, to be inserted automatically into a text box when a page loads. However quite how to do this im not sure.
I have made the form and have a JavaScript which does the job, but I want to know how to get the JavaScript to display the information in the text field.
Here is the JavaScript:
And heres the basic form:
I've tried a few things with no success. I think the script may need changing to make this work. Anyone got any ideas?
Cheers,
NuGG
I have made the form and have a JavaScript which does the job, but I want to know how to get the JavaScript to display the information in the text field.
Here is the JavaScript:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<!-- Begin var xy = navigator.appVersion; xz = xy.substring(0,4); document.write("<center><table border=1 cellpadding=0><tr><td>"); document.write("<center><b>", navigator.appName,"</b>"); document.write("</td></tr><tr><td>"); document.write("<center><table border=0 cellpadding=0><tr>"); document.write("<td>Code Name: </td><td><center>"); document.write("<b>", navigator.appCodeName,"</td></tr>"); document.write("<tr><td>Version: </td><td><center>"); document.write("<b>",xz,"</td></tr>"); document.write("<tr><td>Java enabled: </td><td><center><b>"); if (navigator.javaEnabled()) document.write("sure is!</td></tr>"); else document.write("<font color=red>**NO**</font></td></tr>") document.write("<tr><td>Screen Resolution too high: </td><td><center>"); document.write("<b><font color=red>",screen.width," x ",screen.height,"</font></td></tr>"); document.write("</table></tr></td></table></center>"); // End -->
And heres the basic form:
<form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p>
<textarea rows="5" name="S1" cols="33">I WANT THE SCRIPT TO BE DISPLAYED HERE onLoad</textarea></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>I've tried a few things with no success. I think the script may need changing to make this work. Anyone got any ideas?
Cheers,
NuGG
Last edited by NuGG; Oct 10th, 2006 at 1:20 pm.
Pubonwheels - Mobile Bar Services for the South West of England.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
Here is an example if it helps.CLICK HERE! Note that your screen resolution must be above 1024X768 to view the example, otherwise it will just forward you to another page.
Pubonwheels - Mobile Bar Services for the South West of England.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
![]() |
Similar Threads
- pass the value to the text box (JavaScript / DHTML / AJAX)
- auto completion of the text box from previous entered values (JavaScript / DHTML / AJAX)
- Text box question (C#)
- Text box population from DBgrid. HELP!! (Visual Basic 4 / 5 / 6)
- text is being written in text box (Web Browsers)
- Help with text box height (HTML and CSS)
- Cannot enter any text in a IE text-box (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Select Box populates text field
- Next Thread: Javascript Help
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate array automatically beta box browser bug calendar captchaformproblem cart close codes column cookies createrange() css cursor date debugger decimal dependent design dom download dropdown element embed enter error events firefox focus form frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 iframe images index java javascript javascripthelp2020 jawascriptruntimeerror jquery jsp libcurl listbox maps masterpage media menu microsoft mimic mp4 onmouseover paypal php player position post problem programming progressbar prototype redirect regex runtime safari scale scriptlets search security select software sql text textarea toggle unicode variables w3c webservice website window windowofwords windowsxp





