473,657 Members | 2,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2 IFrames -Iframe1 btn onclick load iframe2 src & pass iframe1 txtbox val as param

200 New Member
Hi, I need help please.

I need to create a textbox with a report url in an iframe below.
Onclick of button create IFrame and pass textbox value into parameter of iframe src.

I'm not to sure how to do this, i think some javascript is needed as I want the button to check the textbox is not blank value first and then create iframe and pass textbox value as parameter.

Does anyone have another method where there are 2 iframes:
Having the textbox & button in first frame - then Onclick check textbox not blank and load second iframe - load and pass textbox value as parameter.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <form id="form1">
  3. <table><tr>
  4.  
  5. <input type="text" text="Keyword" id="keyword" value="">
  6. <input type="button" text="filter" id="filter" onclick="
  7.    <IFRAME id="frame1" src="http://srv08-za199/BI&rs:Command=Render&Key="+filter.value+"></IFRAME>"
  8.  
  9. </tr>
  10.  
Please Assist!
Nov 16 '08 #1
4 2938
David Laakso
397 Recognized Expert Contributor
Do you have an (X)HTML/CSS question?
Nov 16 '08 #2
ismailc
200 New Member
Hi, I thought that this was an HTML question, should i repost to javascript?
Nov 17 '08 #3
ismailc
200 New Member
Working!

Expand|Select|Wrap|Line Numbers
  1. <tr>
  2.   <input type="text" text="Keyword" id="keyword" value="">
  3.   <input type="button" text="filter" id="filter" onClick="(document.getElementById('keyword').value=='') ? alert('Enter a Keyword!'); document.getElementById('frame1').src='http://srv08-za199/BI&rs:Command=Render&Key='+document.getElementById('keyword').value;">
  4. </tr>
  5. <tr>
  6.    <IFRAME id="frame1" src="blank.htm">iframe_placeholder_value</IFRAME>
  7.  
  8. </tr>
  9.  
Nov 17 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
Yes, it was a JavaScript question - moved to JavaScript.

Thanks for posting your solution, but I noticed one thing: you've probably got a missing colon for the short-hand if-else syntax.

PS. can you please ensure you use code tags properly (without a colon in the opening and closing tag). Thanks.
Nov 17 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
3918
by: maxim vexler | last post by:
I'm reading a lot of talks lately about the term iFrame and with your permission would like to ask a few question about that : - what is iFrame, i mean what is it good for ? - does all the popular browsers support it (mostly mozilla & the much hated IE, google says the do but nothing is better that experienced answer) - iFrames replaces the old frames once used in html to show a number of pages in a single windows, right ? - what are...
7
3680
by: Scott | last post by:
Hello All, I've been reading all of the various issues with Iframes in netscape. I have tried all of the various fixes posted, and have even implemented both an iframe and ilayer. My problem is that no matter which i use, i can access the src before and after i change it, but the page never displays. in IE6 it works no matter how i access it. here is the code that is changing it: function InternalNav(sPage) {
1
1672
by: Nick Tew | last post by:
Hello, This relates to the previous post i've left. This problem is do with the browser's back and forward buttons. When clicked, can it be made to affect any history NOT in the iframes. Therefore only going backwards and forwards through the pages history; leaving the iframes as they are. Any help would be great.
7
1599
by: bscofield | last post by:
What would be the danger in having a lot of hidden iframes? i.e. potentialy 30-40. I need to store a bunch of data and thought about using hidden iframes to do it but wasn't sure if this would bog down my page or not. Opinions? I know this is not an IDEAL way to store data but I'm at my whitts end and it sounds like a nice workaround right about now!
2
2089
by: Guadala Harry | last post by:
1. Are IFrames supported only in uplevel versions of IE? If not IE exclusively, what browsers support IFrames? 2. Are IFrames going to be supported in the future - as far as anyone knows - or have they been deprecated and will no longer be supported in the future? Please note that I'm *not* asking for opinions on the merits of using IFrames or IFrames vs regular framesets or any other such...
3
2135
by: Giggle Girl | last post by:
Is there a way to use Javascript to detect if a browser supports IFrames, or (if it DOES support them) that IFrame use is enabled? Thanks, Ann
4
2265
by: Alex D. | last post by:
Hi guys. I have two nestes IFRAMES in one of my pages. The main page has an Iframe that points to an aspx page, this page has another Iframe that points to a regular html file. My problem is when resizing the IE window I loose the inner Iframe, it disappears for some reason. Any ideas?? Thanks a lot, Alex.
5
1917
by: Gary | last post by:
If one has two iframes side by side is it possible to get them both to scroll when the user scrolls one of them? If it is possible is there a reference that will help me in solving this. Someone suggested I try this group. Gary
11
2212
by: Kent Feiler | last post by:
One thing I like about frames is that they're a good place to stow Javascript. Javascript that I'd like to be around while the visible content of the screen changes goes in the frame declaration HTML file. It never needs to be reloaded and JS variables can be updated there as the visible screens progress. But...if I want to be a good internet samaritan and not use frames, what's the best way to replace that function?
19
5927
by: wmanzo | last post by:
I have a really professional conspiracy movie site and I use tons of layers and an external scroll bar assembly. I would like to put the various sections into MS Iframes and in order to clean up the page but I find that the iframes interfere with the getting the mouse coords from the screen which is essential in moving the scroll bar around. My test html is given below. With the iframe hidden the mouse coords are obtainable. With the...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.