473,385 Members | 1,582 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,385 software developers and data experts.

Window popup in XML?

I apologize for the length of this, my first post here, but I have a
long story to
tell.

I am writing a page with mathematical content, and I have decided for
a variety of reasons to use MathML despite its incomplete support in
browsers. I am simultaneously trying to learn Macromedia Dreamweaver,
XML, CSS, and MathML so I don't know if this may be a newbie
question,
but I haven't been able to find a solution to it. So far via a
combination of
books and web searches I've managed to find solutions to most of the
things I've wanted to do. But now I'm completely stumped.

Here's the basic sequence of problems and solutions:

1. Dreamweaver is set up to recognize XHTML, but I couldn't seem to
embed
MathML examples into the XHTML and have them display (Firefox 3.0.1 is
my main test platform). Since the example pages at www.w3c.org/Math
seemed to be XML, I switched to XML, i.e put the following line at the
top of
my file (there are other lines, which I'll get to in a minute).

<?xml version="1.0"?>

I believe I also had to include an <?xml-stylesheettag and download
some XSL files, and also include this
<!--
pref:renderer="techexplorer-plugin"
pref:renderer="techexplorer"
pref:renderer="css"
pref:renderer="mathplayer"
pref:renderer="mathplayer-dl"
-->

(I think that last snippet came from W3C)

That is, I've done those things, but don't recall if that was the
minimal
set of actions to make MathML display. At any rate, it now displays
correctly
in the browser.

2. Dreamweaver is a developer program that has a split screen,
showing
raw XML code in one window and an attempt to render the appearance
in another window. Changing from XHTML to XML broke the split screen.
Design Sciences has a page on working with Dreamweaver and MathML
at http://www.dessci.com/en/support/mat.../mathmldw8.htm

Split screen still didn't work, i.e. Dreamweaver didn't recognize the
html,
until I added a DOCTYPE tag and also renamed it to have an *.xht
extension.

That was sufficient to make split screen work again, though the <math>
tags
are not recognized and math content does not appear correctly. Fine, I
can
live with that.

3. I started to realize pretty quickly that I was going to want to use
CSS. It took
me a while to figure out that I get only one <?xml-stylesheetper
document,
and that I use @import to combine them. But I did that. I wasn't sure
I could
define a CSS file and import XSL (MathML comes with an XSL), but
nothing
seemed to complain when I did that.

So now my web page starts this way:
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="leverrier.css"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
pref:renderer="techexplorer-plugin"
pref:renderer="techexplorer"
pref:renderer="css"
pref:renderer="mathplayer"
pref:renderer="mathplayer-dl"
-->
<head>

and my CSS file starts this way:
@import url(pmathml.xsl);
@import url(/Accessible_Design.css);

body {
color: #0000ff;
background-color: #DDDDDD;
}, etc.

All seems good.

4. Now I wanted some active content. My original HTML version of this
page
had popups that were implemented this way:

<a href="#"
onClick="popup('images/lev58_4a.png', 'original');return false;">
Original
</a>

This doesn't work in XML. I did some reading, and found that
(a) popping up new windows is frowned on now in polite society, and
(b) the hover trick using CSS to popup content when the mouse is
over some region of the page.

OK, fine. I implemented the hover trick. It works beautifully in my
XML page.

But I'm beginning to think that I still want "click-to-show/click-to-
dismiss"
functionality. Ideally, I'd even want a checkbox that showed all
hidden content
with a single click. The main driver for this is that I'd like to be
able to
have the option of printing with the hidden content all showing.

And that brings me to...

5. Does Javascript run in XML pages? Or is there some other way to
dynamically
change the class of an object on an XML page so that a different CSS
rule takes effect?

6. I'm also confused about the role of XSL. As I understand it, XSL
transforms
a page at browser access time. I could theoretically write rules so
that the
browser receives HTML instead of XML. Then I could do all the
Javascript
I want. But then my MathML would break, wouldn't it? That seems to
want
to be part of an XML page.

There's more, but that's enough for one post. Thanks for any insight
anyone can provide.

Randy
Sep 20 '08 #1
1 3718
Randy Poe wrote:
5. Does Javascript run in XML pages?
It depends on the browser. With Mozilla or Opera you can certainly use
the XHTML script element in XML or XHTML documents to use script.
6. I'm also confused about the role of XSL. As I understand it, XSL
transforms
a page at browser access time. I could theoretically write rules so
that the
browser receives HTML instead of XML. Then I could do all the
Javascript
I want. But then my MathML would break, wouldn't it? That seems to
want
to be part of an XML page.
I don't use MathML but I believe in the case of MathML the XSLT
stylesheet is used to cater for both Mozilla and IE. Mozilla should be
able to deal with your XML/MathML document just fine but with IE the
XSLT stylesheet is necessary to ensure IE renders any HTML and a plugin
renders the MathML.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 21 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Noozer | last post by:
When using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window? This is what I've written in the NewWindow2 event,...
10
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to...
3
by: Michael | last post by:
I am trying to allow a user to view a PDF in a new window. I currently have this working using the following: <a href="./pdf.do?parameter=01121980" target="top"><b>pdf</b></a> The problem...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
7
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
4
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.