Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Javascript/Jquery SharePoint

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
Isaac
Asked:
Isaac
  • 2
1 Solution
 
danbaugherCommented:
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
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
Oh ok. Well can jQuery do a window pop for the second page. If so I can it be done?
0
 
danbaugherCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now