Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4551478
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:38:30+00:00 2026-05-21T16:38:30+00:00

Banging my head against the wall….. I have a SP list that uses an

  • 0

Banging my head against the wall…..
I have a SP list that uses an ajax script to pull different content into a page on click. I want the site owner to be able to enter a value in the list to determine which content is called up when the page opens.
The xsl:

<xsl:for-each select="//Data/Row">
    <a>
        <xsl:attribute name="href">javascript:ajaxpage('<xsl:value-ofselect="./@Target_x0020_page"/>','<xsl:value-of select="./@Target_x0020_div"/>');</xsl:attribute>
        <xsl:value-of select="./@Category"/>
    </a>
</xsl:for-each>

JS to open default content:

ajaxpage('2minxcat2.aspx' , 'index')

I’ve tried an xsl:if but it gets ignored.
Any help appreciated.

Clarification;
@CBono Sorry-the js is called with a link and works fine. This is an Office Live Small Business site-the xml is auto generated off the list and the xsl called in with a link. I’m trying to include this additional js snippet in the xsl so the owner can change which ajax content gets called in when the page opens by simply making a change in the list:

<script type="text/javascript"> ajaxpage('contenturlhere' , 'targetdiv') </script>

I’ve tried adding this:

 <xsl:if test="Opening_x0020_category = 1"><script type="text/javascript">ajaxpage('<xsl:value-of select="./@Target_x0020_page"/>

‘,”)

But nothing gets outputted. It works as expected when the javascript above is inserted outside of the xsl.
The logic I want is “If one of the list items has a ‘1’ in a specified field, insert this content in this div when the page opens”.

XML:
Link

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T16:38:31+00:00Added an answer on May 21, 2026 at 4:38 pm

    I just rebuilt it line by line and it worked. The problem was the js not the xsl. Somehow the js was getting broken up after I entered it. When I made sure it was on one line, it worked.
    My own dumb fault. Thank you for your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been banging my head against the wall with this odd behaviour on
I'm banging my head against a wall. I want a regex that matches: empty
I'm banging my head against a wall with this one. I have raphael js
I've been banging my head against the wall with this one. I have a
So I have been banging my head against the wall for days on this
I have the following code and am banging my head against the wall why
I have been banging my head against the wall for a few hours on
I have been banging my head against the wall on this one, for some
I have been banging my head against the wall- can anyone help with working
I have been banging my head against the wall trying to get Exscript installed.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.