By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,718 Members | 1,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,718 IT Pros & Developers. It's quick & easy.

Assigning functions to buttons

P: n/a

Hi,

I am creating a tool to merge xml files using xslt usin
Javascript/HTML.

Basically the user browses (browse button) to where there xml file
are, then browses to where their xslt file (to perform an operation
is. Then they click an "apply" button and the result is output in
frame below.

My problem:

I have the tool working fine when I only have one input xml file (whic
is no good in a merge tool!!) but when I modify the code and ad
another xml field, the apply button will not work for two fields!

I think I haven't assigned the functions correctly to the xm
fields/apply button. Heres some of the code I suspect is wrong, but i
not sure where??

<table width="800">
<tr>
<td width="370">
XML File 1
<input type="file" size=15 id="xmlField1">
<input type="button" value="XML Src
onClick="ApplyStyleSheet(xmlField1.value, 'defaultss.xml');" id=xmlsr
name=xmlsrc>
XML File 2
<input type="file" size=15 id="xmlField2">
<input type="button" value="XML Src
onClick="ApplyStyleSheet(xmlField2.value, 'defaultss.xml');" id=xmlsr
name=xmlsrc>
</td><td> </td>
<td width="370">
XSL File
<input type="file" size=15 id="xslField">

<input type="button" value="XSL Src
onClick="ApplyStyleSheet(xslField.value, 'defaultss.xml');" id=xslsr
name=xslsrc>
</td></tr>
<tr><td> </td>
<td width="80">
<input type="button" value="Apply
onClick="ApplyStyleSheet(xmlField1.value && xmlField2.value
xslField.value);">
</td><td> </td>
</tr>
</table>

Any suggestions/advice/feedback would be greatly appreciated.

Many Thanks
Ciara

cmckenna8
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message45839.htm

Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"cmckenna82" <cm***************@mail.forum4designers.com> wrote in
message news:cm***************@mail.forum4designers.com...
<snip>
Posted via http://www.forum4designers.com


forum4designers.com is a bad place to read comp.lang.javascript from
because their presentation of the group garbles the Usenet posts it is
derived from. Removing *significant* formatting, omitting sections and
adding text and white space that was not part of the original posts to
Usenet. And they only report a fraction of the posts made to the
group, giving an incomplete and inaccurate representation of the group.

In addition, the posting mechanism used by forum4designers.com fails
to properly implement RFC 1036 (Standard for Interchange of USENET
Messages), and in a way that is likely to result in confusion as to
conversational flow and intended respondee for anyone using genuine
Usenet software.

forum4designers.com is also a bad pace to ask javascript questions
from because their misrepresentation of the group, combined with
deliberate deceptions about the nature of the service that they
provide, have resulted in a level of resentment of
forum4designers.com that will negatively impact on anyone who decides
to associate themselves with that web site.

But being aware that forum4designers.com may not report posts made in
response to questions asked from there, and will actively
modify/distort any responses they do show, potential responders may
consider it a waste of there time to put any effort into responding to
posts originating from forum4designers.com even if they have no
attitude towards that site.

Many other sites provide superior web-based access to Usenet, and
often without distortion or omission, including groups.google.com
(who also provide extensive and flexible archive searching
facilities). But the best method of reading and posting to
comp.lang.javascript is through a news server via (standard and
standards conforming) newsreader software.

Richard.
Jul 20 '05 #2

P: n/a
JRS: In article <c1*******************@news.demon.co.uk>, seen in
news:comp.lang.javascript, Richard Cornford
<Ri*****@litotes.demon.co.uk> posted at Thu, 19 Feb 2004 02:14:59 :-
Many other sites provide superior web-based access to Usenet, and
often without distortion or omission, including groups.google.com
(who also provide extensive and flexible archive searching
facilities).
"and often"? After "Many", ISTM not needed.

Anyone who can use the offending site can use "Google Groups"
<http://groups.google.com/> to observe the full content of this
newsgroup and compare it with the censored version.

But the best method of reading and posting to
comp.lang.javascript is through a news server via (standard and ^^^^^^^^^^^^
I'd omit those words; the only likely interpretations, to the type of
user being addressed, are "Web" and/or "MSOE". There is no need for
standard software when one can have standards-conforming software.
standards conforming) newsreader software.


--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 20 '05 #3

P: n/a
"Dr John Stockton" <sp**@merlyn.demon.co.uk> wrote in message
news:9m**************@merlyn.demon.co.uk...
<snip>
... , and often without distortion or omission, ...
<snip>"and often"? After "Many", ISTM not needed.
I am not so sure. The software that forum4designers uses is open source
and currently in use by other sites, some of whom are using similar HTML
presentation. So they too will be trimming and generally garbling their
content, and if subject to a similar campaign of criticism may also
resort to direct censorship.

Fortunately these other sites do not seem to be attracting any users so
they are currently no a problem (some of the ones I looked at are so
obviously run by charlatans that even the very dim would not choose to
use them). But there is no advantage to the users of forum4designers if
they switch to an alternative provider of web-based access if that
provider is just as bad as (or potentially worse than) forum4designers.

Given the availability of the software and the number of sites using it
I don't know why forum4designers appears to be the only one attracting
users, and thus attention. They have probably invested in some sort of
direct promotion, which would explain their reluctance to come clean
about the true nature and quality of their service (as that may directly
contradict their promotional material).

Incidentally, forum4designers seems to be conceding the formatting
point. They are now replacing the space characters in posts with &nbsp;
in the HTML. So some of the code indenting will be preserved. It is not
a good solution because their HTML is erroneous and bloated to start
with so adding 5 bytes for every space in the source is passing quite a
burden on to their users (especially in comparison to the obvious
alternative).
Anyone who can use the offending site can use "Google Groups"
<http://groups.google.com/> to observe the full content of
this newsgroup and compare it with the censored version.

<snip>

And to post from there, avoiding the unfortunate associations and
substandard posting software.

Richard.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.