PDA

View Full Version : another prob on pdf



syazyan
09-20-2006, 09:05 AM
i got a drop down which list down name of the pdf file...

how can i popup the pdf file when the user select the pdf name from the drop down menu...

can somebody help me...??:confused:

codeexploiter
09-20-2006, 11:32 AM
<form name="testForm">
<select name="menu" size="1" onChange="pop()">
<!-- CHANGE THE BELOW URLS TO YOUR OWN-->
<option value="c.pdf" selected>c.pdf</option>
<option value="b.pdf">b.pdf</option>
</select>
<input type="button" name="test" value="Go!" onClick="pop()">
</form>

<script language="javascript">
<!--
function pop()
{
var selectedurl=document.testForm.menu.options[document.testForm.menu.selectedIndex].value
win1=window.open(selectedurl)
}
//-->
</script>


check the above code which demonstrates what you mentioned in your posting.

Plz change the path and name of the pdf files you want to list and according to that change the drop down menu.

syazyan
09-21-2006, 02:05 AM
tq codeexploiter...the code was successful....tq...:D