SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing values to a window.Plz help.

    Hi all,
    I've a php code below which involves a window of javascript and i need to transfer the below values of php to this javascript window and later pass the same to another page(php page).
    "avpedit.php?vp=$videopid&streamname=$name&directory=$directory&id=$streamid&pp=$pcrpid&ap=$audiopid&at=$audiotype&vt=$videotype&pn=$prognumb&vud=$vus//er//data&am=$amode&sr=$samplingrate&rsol=$resolution&cf=$chromaformat&ar=$aspectratio&fr=$framerate&vb=$vbitrate&ab=$abitrate&ao=$aonly&vo=$v//on//ly&ev=$expvid&ea=$expaud&av=$audiovideo"

    How do i do that? Plz help.


    Code:
    echo "<tr><tt><a href=\"#avpedit.php?vp=$videopid&streamname=$name&directory=$directory&id=$streamid&pp=$pcrpid&ap=$audiopid&at=$audiotype&vt=$videotype&pn=$prognumb&vud=$vus//er//data&am=$amode&sr=$samplingrate&rsol=$resolution&cf=$chromaformat&ar=$aspectratio&fr=$framerate&vb=$vbitrate&ab=$abitrate&ao=$aonly&vo=$v//on//ly&ev=$expvid&ea=$expaud&av=$audiovideo\" onclick=\"hint_wnd = window.open('', 'hint_wnd', 'width=300, height=200, resizable=no, scrollbars=no,left=500,top=500' );hint_wnd.document.write( '<b><center><u>Authentication Required</u></center></b><br><br>Enter //Password:<INPUT type=text name=pwd> <br><br> <center><input type=submit value=Submit onclick= authen() ></center>' );return //true;target=newWin;\"  title=\"Click to Edit\">Edit</a></tt></tr>";

  2. #2
    SitePoint Member jtreefrog's Avatar
    Join Date
    Nov 2003
    Location
    Roseville, Mi
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you considered accessing the 'window.location.search' property in Javascript?

    You can also use php to create javascript variables:
    PHP Code:
    <?= "var vp=$videopid?>
    Without being 100% clear on what you're doing; that's what I come up with.
    Give a man a match, and he'll be warm for a minute, but set him on fire, and he'll be warm for the rest of his life.


Bookmarks

Posting Permissions

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