Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
Using a variable in the src attribute of frame
john sal
Ranch Hand
Posts: 94
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Using a variable in the src attribute of frame
The opening page link is like
<a href="abc.html?name=test.html">
now this abc.htm page contains a html frame.
Now i want to get the value of name field from the request and want to pass it in the src attribute of a frame
<script type="text/javascript"> var nameId = "<%=request.getParameter("name")%>"; </script>
now i want to pass this nameId to the src attribute of frame
<frameset rows="..
<frame src=..
<frame src= nameId />
</frameset>
however when i am using the nameId as a value of src parameter of frame it is not working. Can someone let me know how this can be achieved.
Albareto McKenzie
Ranch Hand
Posts: 312
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Of course it is not passed, you don't post the the frame but a form, if you want to post things that are not in the form you can invoke a function instead of a link, something like this:
function postMyForm() { var myForm = getMyForm(); var name = getNameFromMyFrame(); var id = getId(name); addIdToForm(myForm, id); myForm.submit(); }
or whatever
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem of <frameset> tag with struts2
Html Frames
Disable Frame using java scrpt
Passing workStation time to a servlet?
Multiple checkboxes and Struts2
More...