/    Sign up×
Community /Pin to ProfileBookmark

how to use hidden iframe

Hi, how do I use hidden iframe to work like submit page (to get value from server) without user presses submit. can you provide sample codes for 2 fields in the form ( required to retrieve value for 2nd field from server once user enter value for 1st field)

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@deep_dhyaniOct 20.2005 — try this example

<html>

<head>

<Script Lanaguage="javascript">

frame_refresh_rate=1000;

mSecond=1500;

function get_update_data(){

window.hFrame.document.write(Math.random())

window.hFrame.location.reload(true);

}

function get_data_from_frame(){

ob=document.getElementById("tarea");

ob.innerHTML+=window.hFrame.document.body.innerHTML+"<br>";

}

window.setInterval("get_update_data()",frame_refresh_rate);

window.setInterval("get_data_from_frame()",mSecond);

</Script>

</head>

<body>

<div id='tarea'>12

</div>

<iframe id="hFrame" name="hFrame" style="display:none">

</iframe>

</body>

</html>
Copy linkTweet thisAlerts:
@tllcllauthorOct 21.2005 — I would like to know how to apply to the case where user enter/change the value of the 1st field, then this value is able to use in server side. from the example I'm not sure how to apply
×

Success!

Help @tllcll 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...