473,395 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Assigning functions to buttons


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
3 1617
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: Will Pittenger | last post by:
Does C# inline functions? I do not see a inline keyword. Is there an implicit inline? Can the compiler select functions for auto-inlining? I am more used to C++ where all these things are...
2
by: Vi | last post by:
Hi, I'm building a screen where I want to allow users to be able to see data one page at a time. The users would view the data by clicking on the Page Nr. The problem is that the number of pages...
10
by: Mike S | last post by:
Does anyone know the logic behind why in VB.NET the result of a floating-point division ('/') is -rounded- on being converted to an integer type, such as with statements like Dim x As Integer =...
4
by: mantrid | last post by:
Hello Hope you can help. I have been using the code below to move elenents around the page. This has worked fine until I put some arguments into the functions so I could use them in many places...
10
by: Steve Pope | last post by:
The first of the following functions compiles, the second gives what I think is a spurious error: "cannot convert `const char' to `char *' in assignment". void foo(int m) { char *str; if (m...
3
by: ajfish | last post by:
dear esteemed javascript gurus. consider the following fragment: var buttons = document.getElementById("tr_Toolbar").getElementsByTagName("button"); for (var i=0; i<buttons.length; i++) {...
41
by: jpmcafee | last post by:
Hi Guys, Iam new to vb2005 and programming and I could really use some help. I have finished my book on vb2005 and i cant find what I am looking for, Essentially I want to create...
7
by: jodleren | last post by:
Hi I have been looking into php.net, but could not find any proper description. There is a way of assigning variables from functions, while at the same time using them in e.g. an if. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.