开发者

Pass form login data to another frameset page

开发者 https://www.devze.com 2023-02-11 21:12 出处:网络
I have a webpage 1 that has a login form on it, like this <form method=\"post\" action=\"webpage2\" name=\"login\">

I have a webpage 1 that has a login form on it, like this

<form method="post" action="webpage2" name="login">
    <fieldset><span class="graytitle">Big开发者_StackOverflow社区 Fields</span>
    <ul class="pageitem">
        <li class="bigfield"><input placeholder="Username" name="id"/></li>
        <li class="bigfield"><input placeholder="Password" name="password" type="password" /></li>
                                <li class="button">
        <input name="Submit input" type="submit" value="Submit input" />

        </li>
    </ul>
        </fieldset></form>

Then I have a webpage2 which is a frameset of a webpage3 which should acquire the data from webpage1.

 <frameset cols='100%'><frameset
 rows='100%'><frame
 src='webpage3.html'></frameset></frameset>

How can I pass the login data to webpage3 which is in a frame of webpage2?

I need it to be like the above scenario with frames. I cannot post directly to webpage3 as I will be adding some addition code to webpage2

THank you


I think this is not possible. IIf webpage1 were in a frame of webpage2, then you could use the target attribute:

<form method="post" action="webpage2" name="login" target="name_of_other_frame">

<frame name="name_of_other_frame" src......

but that's about it I think.


If it doesn't need to be secure, you can put the login into your iframes src (querystring), like:

<iframe src="webpage3.html?username=something&password=something"..

You'd have to insert those values, but pretty simple.

Edit note: You could encrypt/encode that data before inserting it, for more security too

0

精彩评论

暂无评论...
验证码 换一张
取 消