Go Back   Ultimate Web Site Drop Down Menu Forum > Web Development > Javascript
Register FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Display Modes
Unread 01-11-2008, 06:58 AM
ISMAILC ISMAILC is offline
Member
Join Date: Dec 2007
Posts: 45
  #1  
Default Thank You

Hi, Thank You i got it going with Help!

Fancy Javascript was needed:
Regards,

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
;(function(){
var field='Something', //set the name of the field
getQval = function (n) {
var r=new RegExp('[?&;]'+n+'=([^&;#]*)'), m=location.search;
return (m=r.exec(m))? unescape(m[1]) : null;
}, updateForm = function() {
var fname=getQval('fname')? getQval('fname') : 0;
document.forms[fname].elements[field].value=val;
}, val=getQval(field);
if(val){
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", updateForm, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", updateForm );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
updateForm();
};}
else window.onload = updateForm;}}})();
</script>
</head>
<body>
<form action="ajax.htm">
<div>
<input type="text" name="Something">
</div>
</form>
</body>
</html>
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:17 PM.


Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.