...

View Full Version : Dynamically change <Param> tag within object??



bbimber
04-25-2008, 02:15 PM
I have a javascript object that contains this tag:

<param name = "url" value = "http://127.0.0.1/upload.lasso">

and i want to be able to modify it so that a form paramter gets passed to the next page. i would like the value to be based on what the user types in a textbox. i think i'm most of the way there. i have a script that modifies the contents of a <span> with the proper string. however, this only works if the span tag is outside of the <object>. is there a better way to do this? i'm a fairly new programmer, so i'm sorry if some of this doesnt make sense. thanks for the help.

Here's what i have:

<script language = "Javascript">

function textbox(Obj) {
objVal=Obj.value;
document.getElementById('experiment').innerText='<param name = "url" value = "http://127.0.0.1/upload.lasso?expt=' + objVal + '>"';
return true;
}

</script>

<input type=text onKeyUp="return textbox(this)" name="expt">


<object type="application/x-java-applet;version=1.4.1"');
width= "290" height= "290" >
<SPAN id=experiment></SPAN>
<param name="archive" value="dndlite.jar">
<param name="code" value="com.radinks.dnd.DNDAppletLite">
<param name="name" value="Rad Upload Lite">
</object>

shyam
04-25-2008, 05:17 PM
you want to change the value of a param tag within the object tag? like this?


<script language = "Javascript">

function textbox(Obj) {
objVal=Obj.value;
document.getElementById('experiment').innerText='<param name = "url" value = "http://127.0.0.1/upload.lasso?expt=' + objVal + '>"';
document.getElementById('url').value = 'http://127.0.0.1/upload.lasso?expt=' + objVal;
return true;
}

</script>

<input type=text onKeyUp="return textbox(this)" name="expt">

<SPAN id=experiment></SPAN>
<object type="application/x-java-applet;version=1.4.1" width= "290" height= "290" >

<param name="archive" value="dndlite.jar"/>
<param name="code" value="com.radinks.dnd.DNDAppletLite"/>
<param name="name" value="Rad Upload Lite"/>
<param id="url" name="url" value="" />
</object>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum