New Message on dotNET User Group Hyd

Sharepoint portal server enquiry(Detail link opening in new window)

Reply
  Reply to Sender   Recommend Message 2 in Discussion
From: johnsonsmithy2k2

Dear Siva,
 
Good Day
 
This is a frequent question. I found some tips on msd2d.com.I listed them in the reference.
 
Well you can do that fairly easy but you need to use Frontpage to alter the link list.
  • Create a new link list on your WSS site.
  • Add one link to it.
  • Open your WSS site in Frontpage 2003
  • Right click your link list and chose the Convert to XSLT Data View.

      your list is now in XSLT view and that will allow you to fine tune and modify it to your likings. To have the links open in a new window do the following.

      1. right click the link item that you added above.
      2. Chose Hyperlink Properties.
      3. From the next page select Target Frame and then select New Window.
      4. Click Ok and save your page.

      All new links added to the list will open in a separate window from now on.

      Be sure that any user does not move or delete the link list from your startpage or your XSLT formating will be lost. If that happens just re do the above and your up agian. This is true even if you have added more than one link to your list (so you do not have to add all your links again to the list). You only have to select the first link and have the target frame point to New Window and all the others will work as the first namely be opened in a new window.

    1.  
      You can find in these tips, these solutions only works to some limited web parts such as Data View web part, Document Library web part. The methods are
      A, using FrontPage 2003 to change the link value;
      B, changing the schema.xml.

      My solution is to find the < A > Tags and then replace their "target" attribute's value to "_blank". So when you click any link, it will open a new window.

      1. Go to spps portal sever
      2. Go to C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033
      3. Backup OWSBROWS.js //change this file will have impact to all pages
      4. Open OWSBROWS.js
      5. Go to a line near bottom: var browseris = new Browseris();
      6. Insert below codes
       

      //Attach to Load event
      window.attachEvent("onload", new Function("NewWin_OnLoad();"));
      //Change all A Tags target attribute vale to "_blank"
      function NewWin_OnLoad()
      {
       try{
           //Get all Tags named "A"
           var aTags = document.getElementsByTagName("A");
           //Look for "A" tags
           for(var j=0;j< aTags.length;j++){
              var aTag = aTags(j);
              aTag.getAttributeNode("target").value="_blank";
              //However some tag has special href,
              //it needs open in itself window
              //such as "Help" link on top menu bar
              // has a default open in a blank window
              //So change its target to the self
              //to avoid open two windows or lose some paras
               if(aTag.getAttribute("href").indexOf("_javascript_:")>=0)
               {
                     aTag.getAttributeNode("target").value="_self";
               }//end of if
           }//end of for
       }//try
       catch(e){
          //Do Nothing - if it doesn't work
       }//end of try
      }//end of fucntion New Window

      pls let me know, if you have any more queries.
       
      Regards,
      Smith

      View other groups in this category.

      Click here
      Also on MSN:
      Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

      To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

      Need help? If you've forgotten your password, please go to Passport Member Services.
      For other questions or feedback, go to our Contact Us page.

      If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
      Remove my e-mail address from dotNET User Group Hyd.

      Reply via email to