![]() |
|
|
|||||||
![]() |
XML - Passing a javascript variable to an external xsl/xml file |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi there,
I'm having a big problem trying to pass a "selected" variable from a html table to a xsl file for filtering off records. My html table is constructed using javacript to import a xml file, and then styled using javascript to detect mouse click and hover events and thus assign classes to each table row. I.e. Code:
These functions are an example of how the table is styled. I would like to (upon clicking on a button entitled "edit applicant") to load my applicants.xml which is styled by my applicants.xsl: Code:
However I can't seem to figure out how to pass the javascript variable from the current html/javscript file to my applicants.xsl/xml document so I can use it in my <xsl if> statement. As you can probably tell by now - i'm aiming to select a table row with my mouse and then click my edit applicant link, which will then in turn only load up a table of the selected record for me to edit. I appreciate this is quite a long post so I thank you for reading it - any advice you can give me would be most welcome, as being a bit new to all this, I'm going bonkers... Regards, Sykth. sykth |
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Oct 2009
Posts: 1
|
I am also trying to do this...I have xsl code in which I call javascript to calculate the difference between a due date and the current date then based on the number of days left I set a status flag that I want to feed back to a column/field value in xsl so that I can sort on that column.
Since the [TODAY] variable in SharePoint is NOT dynamic, I had to use javascript to determine how many days were left between my due date and the current date. I have gotten my days left calculation to work thanks to a blog from Chistopher Johnson, but now I need to feed the Status Flag variable backt o xsl so that I can sort on it. I am going crazy looking at all the blogs out there and please do not tell me to use a calculated column in SP with TODAY as TODAY is in SP is STATIC and I need to use a dynamic Current Date in my calculations. In short I just need a simple way to feed the value of my javascript variable FlagStatus back to the value of the XSL field Status_x0020_Flag. I think I need to do something with this code to reference the javascript variable for the value, but can't figure ut what to do. Can anyone help? <xsl:value-of disable-output-escaping="yes" select="@Flag_x0020_Status" /> MoBo |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing value with out using variable in query string in PHP! | Ali_ggl | General Help Related Topics | 0 | 11-29-2008 12:22 PM |
| Address Bus and External Data Bus Confusion | LoXodonte | A+ Certification | 1 | 04-18-2006 10:09 PM |