Jump to content

Not to all scroll of buttons in xml/xslt


Guest michadous

Recommended Posts

Guest michadous

hi,I have a screen which has buttons and data displayed. now when thedata becomes large scroll bar appears and the buttons also start scrolling along with the data. Now I would like to have these buttons stationary at the top, and only the data should scroll. How do I do this in the XSLT file? This is the way I build button names <xsl:value-of select="Item_Btns"/> Thank you in adv.cheerssam

Link to comment
Share on other sites

Well, how do you do it in XHTML?XSLT only transforms XML into XHTML or other XML based language. It's not suppose to add interactivity in any matter (exept adding JavaScript in the output, but that's still not interactivity by itself). If there's a way you can do it with XHTML, you can somehow achieve the same effect with XSLT too.Current solutions I can think of are frames, using position:fixed on the buttons(doesn't work in IE), or some kind of a JavaScript to move them (probably the only working thing which could be added in a single XSLT file).

Link to comment
Share on other sites

I agree with Boen. I think frames are going to be your best bet for this, but you will find that you need to separate the XSL and the XML for the buttons into other sources - if you don't, you could have the buttons appearing on your screen twice, once when you load them into the first frame and again when you load the data. That would only confuse the person reading the page.try something like :

<frameset rows="10%,90%"><frame id="pheader" src="mybuttons.xml" /><frame id="pbody" src="mydata.xml" /></frameset>

If you want the buttons to change the frame content in the body of the form, then you can add script to the buttons xml file which changes the src property of the frame called "pbody".Personally, I would suggest that this is more than you need to do (although it does look nice!) and you could even just put anchors in the header frame which link to the page you need to show in the body of the document. If you do go down the button route then put some code in like:

<script language="Javascript">function loadnewpage(sourcedoc){window.frameElement.parentElement.document.frames['pbody'].src = sourcedoc}</script>

Each button can then submit it's own url for sourcedoc using the onclick event.Have fun - Dooberry :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...