Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Trying to pass querystring from Iframe within parent base onclick!!

Posted on 2004-10-23
2
Medium Priority
?
458 Views
Last Modified: 2010-08-05
I have a updatedoctor1.asp where I call on an Iframe and I populate the Iframe with all of my images I pulled down from a folder. What I trying to do is when a user clicks on a certain image I would pass the name of the image into a text box I would then pass back to my table. What's happen is I'm having problems passing the name back to the updatedoctor1.asp  page.


What I thought would work was onclick="PopulateTextBox('<% response.write(s)%>')"><img src="<% response.write(lcVariable)%>">

<script language="JavaScript">
   function PopulateTextBox (lcInvValue){
     var name = lcInvValue;
      document.myform.myTextBox.value = name;
   }


I'm not sure how or where to place myTextBox in order to get the Name value.

The Iframe is in a document call updatedoctor1.asp
<tr>
<td colspan="3"><iframe width=100% height="100" src="smalllistimages.asp" align=left  frameborder=0 hspace=0 vspace=0 name="ImagesView" > </iframe></td>
</tr>

d.
0
Comment
Question by:Dstathakis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Saqib Khan earned 2000 total points
ID: 12390120
if the Textbox is in main document then update its content by doing this

parent.document.myform.myTextBox.value = name;
(Means myTextBox is a textbox within main Document, and you clicked on the image within IFRAME).

and to update something within IFRAME from main document then

document.myFrame.myform.myTextBox.value = name;
(Where myFrame is the name of IFrame and text box is within IFRAME).

Good Luck
0
 

Author Comment

by:Dstathakis
ID: 12390139
Thank You it worked!!
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question