Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing an iframe in dynamic code 1

Status
Not open for further replies.

davejam

Technical User
Jan 6, 2004
313
GB
Hi all,

using classic ASP with VBScript and Javascript.

I have an IFrame on my page which i intend to change dependant on a selection within my main page, this saves reloading the logo etc whenever a user wants to navigate between areas.

I have declared my iframe and gave it an id(srvPage)
within my td(which i want to use as the onclick to navigate round the menus) i have

Code:
  <td onclick=javascript:passForm("clList.asp")>Client List</td>

then as my function i have

Code:
<script>
passForm(a){
 document.getElementById('srvPage').src = a;
}
</script>

I Keep getting a javascript error with the error as: expected ';'

Am i missing something here, been a while since i've played with javascript and iframes....

Cheers
for any thoughts or ideas



daveJam

*two wrongs don't make a right..... but three lefts do!!!!*
 
Shouldn't this be in the Javascript form instead of ASP?

Sorry can't help you with js
 
You should probably declare your Javascript function with the appropriate keyword function.

Lee
 
how silly do i feel, cheers for that, can't beleive i was overlooking something so simple

daveJam

*two wrongs don't make a right..... but three lefts do!!!!*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top