Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dynamically change <Param> tag within object??

    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>

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    you want to change the value of a param tag within the object tag? like this?

    Code:
    <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>
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •