Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Javascript/Jquery SharePoint

Posted on 2011-09-27
3
Medium Priority
?
187 Views
Last Modified: 2012-05-12
Hello all,

I have a code that searches a page and then highlights the information that is found. I would like to create a code that if it is not on page A then it should stop and search page B. If it is not on both pages then it will return nothing. Below is the code that I have that searches a page.

$("body").delegate("#inoiceNumber_a", "click", function(e){
      JumpAndSearch("#inoiceNumber", "si_", "#divSearchErrorMsg", SPSITENAME + "invoiceInformation.aspx");
});


Now if I can only let it search two pages if it doesn't get it in the first page.

Thanks in advance.
0
Comment
Question by:Isaac
  • 2
3 Comments
 
LVL 1

Expert Comment

by:danbaugher
ID: 36711471
You can't access more than 1 page at a time in jQuery. You would need to code this on the backend or load the second page inside of the first page with ajax.
0
 
LVL 5

Author Comment

by:Isaac
ID: 36711660
Oh ok. Well can jQuery do a window pop for the second page. If so I can it be done?
0
 
LVL 1

Accepted Solution

by:
danbaugher earned 2000 total points
ID: 36712119
Yes you could load the second window in a popup or lightbox and do your highlighting from there. You could pass the information to be highlighted after a hash tag, then have your ready function check for the existence of that hash tag and highlight content.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question