简体   繁体   English

每当用户点击除主页按钮以外的其他位置时,仅显示一次POP菜单

[英]Displaying POP up menu only one time whenever user clicks other than homebutton

i created a popup menu in iframe 我在iframe中创建了一个弹出菜单

i want to open that popup menu one time whenever user clicks on remaining links in the navigation but not at home page 我希望每当用户点击导航中的剩余链接而不是主页时打开该弹出菜单

after filling that popup menu it must redirect to user clicked page... 填写弹出菜单后,它必须重定向到用户点击的页面...

i am not getting any idea please help me to write code 我不知道请帮我写代码

here i am pasting some code 我在这里粘贴一些代码

please help anyone 请帮助任何人

  <iframe id="" src="Enquiry Form3/enquiry-pages.aspx" scrolling="no" frameborder="0" width="100%" height="800"></iframe>` 

above code is opening for each link for every time 以上代码每次都为每个链接打开

but i want to get open only one time whenever user clicks other than home button 但是我想只要用户点击主页按钮以外的其他时间就打开一次

Is your popup in an iframe? 你的popup是iframe吗? Or is your iframe inside the popup. 或者是你的iframe弹出窗口。 I wasnt clear on this. 我对此并不清楚。

Do you want the popup to appear before the page load or after. 您是否希望弹出窗口在页面加载之前或之后出现。 You could put listeners on the nav links to display the popup. 您可以将监听器放在导航链接上以显示弹出窗口。 Then after your form is complete navigate to the desired page. 然后在表单完成后导航到所需的页面。

Im thinking something like this 我在想这样的事情

 $('a.navLink').click(function(event){
       event.preventDefault(); //this stops nav relocation
     //then show modal
 })

Then when u close popup there should be a close listener callback. 然后当你关闭弹出窗口时,应该有一个关闭监听器回调。 Put your relocation reference there... 把你的搬迁参考放在那里......

 document.location.href = someUrl.com

OR 要么

Just display the modal on the page after navigation completes and close it. 导航完成后,只需在页面上显示模态并关闭它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM