/    Sign up×
Community /Pin to ProfileBookmark

Problem with IFrame and Form

Hi, I have problem with my iframe…

Basically I have one form name=’FilterPlgn’ with 1 text area name=’pelanggan’ and 1 submit button name=’filter’.
My iframe src=’invoiceheader.php’ name=’header’ .

This is my code

[CODE]<table width=”100%” border=”0″ cellspacing=”2″>
<tr>
<form name=”FilterPlgn” action=”#”>
<td class=”box”>
<span class=”formlabel”>Nama Pelanggan:</span>
<span class=”formfield”><input type=”text” name=”pelanggan” size=”32″ maxlength=”100″ value=””></span>&nbsp;
<input type=”submit” class=”button” name=”filter” value=”Filter”>&nbsp;&nbsp;
</td>
</form>
<td class=”box” align=”center”>
<input class=”button” name=”refresh” type=”button” value=”Refresh” onClick=”parent.header.document.location.replace(‘invoiceheader.php?action=refresh’);”>
</td>
</tr>
</table>[/CODE]

For REFRESH button i made is work excelent, but i can’t figure out how to pass a [COLOR=Red]PELANGGAN[/COLOR] value in the form to iframe src?? What javascript function i should make to pass the value only in iframe URL but not on the main page??

Btw this is my PHP code in invoiceheader.php

[code=php]if (isset($HTTP_GET_VARS[“pelanggan”])){
$id = $HTTP_GET_VARS[“pelanggan”];
echo $id;
}[/code]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterSep 27.2005 — The generic code would look like this:
<i>
</i>&lt;form name="FilterPlgn" target="header" action="invoiceheader.php"&gt;
&lt;input type="text" name="pelanggan" value=""&gt;
&lt;input type="submit" name="filter" value="Filter"&gt;
&lt;input type="submit" name="action" value="refresh"&gt;
&lt;/form&gt;

The submit button itself acts like an input field in a form if it was used to submit the form. If JavaScript is used to dynamically submit a form -- the submit button's value isn't passed on with the form nor if you used submit button 1 of 2 etc.
×

Success!

Help @pido spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...