如何在弹出窗口中提交表单? [英] How to submit a form in a popup window?

查看:82
本文介绍了如何在弹出窗口中提交表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Javascript,我在弹出窗口中打开一个基于网络的网址。


MyWin1 = Window.Open(url,mywindow)


在弹出窗口的url中有一个表单(form1),我需要

提交该表单。


怎么做我从当前窗口的javascript中提交了form1吗?


谢谢。

-

V

解决方案

2008年8月7日上午4:31印度时间,_V S Rawat_写道:


使用Javascript,我在弹出窗口中打开一个基于Web的URL。


MyWin1 = Window.Open(url,mywindow)


弹出窗口的url中有一个表单(form1),我需要

提交该表单。


如何提交来自我当前窗口的javascript中的form1?


谢谢。



任何人都可以在新手上为新手推荐新闻组,我可以在这里询问我的问题。

谢谢。




VS Rawat schreef:


2008年8月7日4 :31日印度时间,_V S Rawat_写道:


>使用Javascript,我在弹出窗口中打开一个基于网络的网址。

MyWin1 = Window.Open(url,mywindow)

在弹出窗口的url中有一个表单(form1),我需要提交该表单。

如何从当前窗口的javascript中提交form1?

谢谢。



任何人都可以推荐一个javascript的新闻组给新手我可以在这里询问我的问题。



这个很好。


问候,

Erwin Moller
< blockquote class =post_quotes>
>


谢谢。



-

======================== ====

Erwin Moller

现在放弃googlegroups的所有帖子。

为什么? http://improve-usenet.org/

= ===========================




VS Rawat schreef:


使用Javascript,我在弹出窗口中打开一个基于网络的网址。


MyWin1 = Window.Open(url," mywindow")



目前为止确定。


>

在弹出窗口的url中有一个表单(form1),我需要

提交该表单。


如何从我当前窗口的javascript中提交form1?



将它提交到哪里?

如果你的弹出窗口有一个表单,它也可以提交它,就像所有其他

页面一样。

如果你的弹出窗口中有类似下面的代码,你应该

be罚款:


< form action =" somescript.php" method =" Post>

您的姓名:< input type =" text" name =" firstname">

< input type =" submit" value ="发布我>

< / form>


如果您要问:如何将表单发布到网页上 ;答案是

简单:你不是。

表格不是发送到HTML文档,而是发送到某个服务器上的脚本

(在上面的例子中命名为''somescript.php')能够收到

forminformation。


但是,你可以转发信息填写其他窗口

(使用JavaScript)。


这就是你想要的东西吗?


此致,

Erwin Moller


谢谢。



-

======================== ====

Erwin Moller

现在放弃googlegroups的所有帖子。

为什么? http://improve-usenet.org/

= ===========================


using Javascript, I am opening a web-based url in a popup window.

MyWin1=Window.Open(url, "mywindow")

There is a form (form1) in the url in that popup window, I need to
submit that form.

How do I submit that form1 from the javascript from my current window?

Thanks.
--
V

解决方案

On 8/7/2008 4:31 AM India Time, _V S Rawat_ wrote:

using Javascript, I am opening a web-based url in a popup window.

MyWin1=Window.Open(url, "mywindow")

There is a form (form1) in the url in that popup window, I need to
submit that form.

How do I submit that form1 from the javascript from my current window?

Thanks.

could anyone recommend a newsgroup on javascript for newbies where I can
ask my queries.
thanks.



V S Rawat schreef:

On 8/7/2008 4:31 AM India Time, _V S Rawat_ wrote:

>using Javascript, I am opening a web-based url in a popup window.

MyWin1=Window.Open(url, "mywindow")

There is a form (form1) in the url in that popup window, I need to
submit that form.

How do I submit that form1 from the javascript from my current window?

Thanks.


could anyone recommend a newsgroup on javascript for newbies where I can
ask my queries.

This one is fine.

Regards,
Erwin Moller

>

thanks.


--
============================
Erwin Moller
Now dropping all postings from googlegroups.
Why? http://improve-usenet.org/
============================



V S Rawat schreef:

using Javascript, I am opening a web-based url in a popup window.

MyWin1=Window.Open(url, "mywindow")

OK so far.

>
There is a form (form1) in the url in that popup window, I need to
submit that form.

How do I submit that form1 from the javascript from my current window?


Submit it to where?
If your popupwindow has a form, it can also submit it, just as all other
pages.
If you have something like the following code in your popup, you should
be fine:

<form action="somescript.php" method="Post>
Your name: <input type="text" name="firstname">
<input type="submit" value="Post me">
</form>

If you are asking: "How do I post my form to a webpage" the answer is
simple: You don''t.
Forms are NOT send to a HTML document, but to a script on some server
(named ''somescript.php'' in my above example) that is able to receive the
forminformation.

However, you CAN tranfer the information filled in to some other window
(using JavaScript).

Is THAT what you are after?

Regards,
Erwin Moller

Thanks.


--
============================
Erwin Moller
Now dropping all postings from googlegroups.
Why? http://improve-usenet.org/
============================


这篇关于如何在弹出窗口中提交表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆