当用户忘记点击所需链接时如何显示弹出窗口 [英] How to display pop up when user forgot to click on required link

查看:66
本文介绍了当用户忘记点击所需链接时如何显示弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个页面有两个文本框和一个链接(一个href)和下一个按钮去下一页。



所有都是mandotory字段。





现在如果用户忘记/错过了单击链接,然后单击下一个/提交按钮,我需要弹出一个请点击链接,并在点击弹出后将流程重定向到链接页面。此弹出窗口仅显示在这个条件只有





我试过在Jquery中选择标签但无法得到是否有逻辑链接是否被点击?



请建议我如何处理Jquery,JS,jsp。





谢谢。

Hi,

I have a page which is having two textboxes and one more link (a href ) and Next button to go for next page.

All are mandotory fields.


Now In case user forgot/missed to click on the Link ,and click on next/submit button ,I need to give a pop up by stating "Please click on the link " and redirect the flow to linked page once he clicked on pop up.This pop up will display only in this condition only


I have tried not select tag in Jquery but unable to get the logic for whether the link is clicked or not?

Please suggest me how to do with Jquery,JS, jsp.


Thanks .

推荐答案

我建​​议使用自定义数据 - 元素的属性。让您的链接看起来像......



I would recommend using the custom data- attribute on the element. Make your link look something like...

<a href="some link" id="infoLink" data-clicked="false" ...="">
</a>





然后使用 attr() jQuery中的函数你可以读取和设置值。



示例:



then using the attr() function in jQuery you can read and set the value.

Example:


#nextButton)。click( function (event){
if false ==
("#nextButton").click(function(event) { if(false ==


#infoLink)。attr( 数据点击)){
// 显示弹出窗口

// 阻止事件进一步发展
event.stopPropagation();
}
});
("#infoLink").attr("data-clicked")) { // display your popup // prevent event from going any further event.stopPropagation(); } });


这篇关于当用户忘记点击所需链接时如何显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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