15,793,921 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Python questions
View PHP questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by G.Mahendra (Top 3 by date)
G.Mahendra
3-Nov-16 2:35am
View
Deleted
Thanks Richard
First i tried below code for "Previous and Next"functionality. But it doesn't fulfill my requirement.
Go Back
Go Forward
By using this script code back button only working forward not working.
After that we think to get URL and store it in array as above.
Now i tried on another way also for getting url.
<title>
var urllist = [];
var ind = 0;
function WhichButton(event) {
if (event.button == 0) {
$(document).ready(function () {
var pageURL = $(location).attr("href");
urllist[ind] = pageURL;
ind = ind + 1;
alert(pageURL);
});
}
}
function goBkHist(a) {
var l_ref = ind - 2;
var pageURL2 = urllist[l_ref];
ind = l_ref + 1;
alert(pageURL2);
loadUrl(pageURL2);
}
function goFdHist(a) {
var l_ref_2 = ind;
var pageURL2 = urllist[l_ref_2];
ind = l_ref_2 + 1;
alert(pageURL2);
loadUrl(pageURL2);
}
function loadUrl(newLocation) {
window.location = newLocation;
return false;
}
Actually what happen is i try to get URL by click on mouse-left click.In the above code i got URL successfully but when i try to click on buttons also mouse-left event fires button event not fired.
How can i solve this problem.If i placed buttons in another div it works fine. But my requirement is need to place buttons in same div only otherwise i am facing issues with design.
How to avoid mouse-left click event at the time of button click.
G.Mahendra
3-Nov-16 2:31am
View
Deleted
Thanks Richard
First i tried below code for "Previous and Next"functionality. But it doesn't fulfill my requirement.
Go Back
Go Forward
By using this script code back button only working forward not working.
After that we think to get URL and store it in array as above.
Now i tried on another way also for getting url.
<title>
var urllist = [];
var ind = 0;
function WhichButton(event) {
if (event.button == 0) {
$(document).ready(function () {
var pageURL = $(location).attr("href");
urllist[ind] = pageURL;
ind = ind + 1;
alert(pageURL);
});
}
}
function goBkHist(a) {
var l_ref = ind - 2;
var pageURL2 = urllist[l_ref];
ind = l_ref + 1;
alert(pageURL2);
loadUrl(pageURL2);
}
function goFdHist(a) {
var l_ref_2 = ind;
var pageURL2 = urllist[l_ref_2];
ind = l_ref_2 + 1;
alert(pageURL2);
loadUrl(pageURL2);
}
function loadUrl(newLocation) {
window.location = newLocation;
return false;
}
Actually what happen is i try to get URL by click on mouse-left click.In the above code i got URL successfully but when i try to click on buttons also mouse-left event fires button event not fired.
How can i solve this problem.If i placed buttons in another div it works fine. But my requirement is need to place buttons in same div only otherwise i am facing issues with design.
how to avoid mouse-left click event at the time of button click.
G.Mahendra
20-Sep-16 14:22pm
View
Thank you