HTML - Xhtml Commandlink
Good morning everybody. I'm stuck in a problem i have more then one week about this command. My objective in this case is using this option on my page, i want to create a file periodically(that part has no problem, it works fine), but also i want to load that created file in another page every time is created. As far as i know, by using only the "action" attribute, the second page only comes after all the operation are completed. Particulary in this case i have a java class that generates (by a loop of 14 times) a .kml file(I'm using StAX and also the creation works fine) including the "Thread.Sleep(9000);" instruction . So when i found that problem, i thought "then i should try to use a second attribute calling the second page i need" and so i found the "actionListener" attribute. But the "actionListener" receives void unlike "action". Again i thought, then i'll just create one single "kml" file and return the second page, after i'll use the "actionListener" to do the rest of the files creation as the second page(using a javascript file) loads the created files", just like this:
<h:commandLink id="page2" action="#{instruction returning the new page}" actionListener="#{creation of the kml files}"> <hutputText value="#{name of the link}" /> </h:commandLink> And so i realized that the "action" attribute only starts when the "actionListener" is completed. So problem i got is right this, because if i try to create one single file and return the second page by the "actionListener", just the kml file is created and nothing more. On the other hand, the "action" never comes first unless there's a way to define priority between these two attributes and i still don't know. I tried many ways, searching for informations on the internet, but nothing until now. Examples of what i tried: <h:commandLink id="page2" action="#{instruction returning the new page}" > <hutputText value="#{name of the link}" /> <f:actionListener... </h:commandLink> Still the "action" only comes last; <h:commandLink id="page2" action="#{instruction returning the new page}" target="_blank" actionListener="#{creation of the kml files}"> <hutputText value="#{name of the link}" /> </h:commandLink> Even using a javascript file to open the new page, it doesn't work, it always returns the first and after the "actionListener" finishes its execution. I also tried the <h:link..., but unfortunally this one doesn't support the "action" nor the "actionListener". Using this inside the <h:commandlink doesn't make any difference and the same goes if i do the inverse. At this moment i'm trying to open the second page exactly on the javaclass to see if that works, but i got a null pointer exception. The code i used is this: public void loadMapPage(String page) { URL url = null; try { url = new URL(page); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(url != null) { getAppletContext().showDocument(url); } } and i get a "NullPointerException". I'll try to find a way to open the page, but i really need help on this. Any sugestion would be great.... Similar TutorialsWhich one is better? XHTML STRICT 1.0 or XHTML 1.1 hi and goodafternoon i run wapsites and i want to convert the wml scripts to xhtml all my scripts are php based which i know will work in xhtml too. i also use mysql coding for database side of things . here is one of my smaller scripts . <?php <wml> <card title="sitename"> <p align="center"> <img src="logo.gif" alt="logo"/><br/> Welcome!!<br/><br/><a href="login.php"><img src="login.gif" alt="Login"/></a><br/><a href="terms.php"><img src="register.gif" alt="Register"/></a><br/> <br/> <big><b><a href="terms.php">Terms of use!</a></b></big> <br/> You are here with<br/> END; print 'Browser:'; $browser = explode ('/', $HTTP_USER_AGENT); print $browser[0]; print '<br/>'; print "IP-Adress: $REMOTE_ADDR<br/>\n"; print <<<END ---<br/> </p> </card> </wml> END; ?> how would i convert that to xhtml . and if its just a case of changing the tags then would it work on the rest of the scripts with sql coding in too . nclemale@hotmail.com or post your replies here thanks in advance I'm pretty new to XHTML and I see that to properly close a br tag (and others), you usually put a space, then a slash, then a closing chevron, a la <br />. But I was wondering if there is anything fundamentally wrong with eliminating the space before the slash. It seems to work in my browser either way, and I think it makes the code a little easier to read and type. Thanks! can make dynamic website in xhtml so xhtml elements should always be in lowercase how does this extend to the case in css. for example if im using a xhtml doctype should i be using lower case color values like color:#ffffff vs color:#FFFFFF. I know as per a hexidecimal value "ffffff" is the same as "FFFFFF" and the same as "fFfFfF". they are all equal to the same value so it really doesn't matter but does the xhtml doctype dictate that these values should be in lowercase? what is xhtml? Please anybody tell me about the XHTML. Hi. I *hate* I.E. I'm usually browsing websites in Google Chrome - & sometimes Mozilla / Opera. Ive designed a website (not public as yet), & it does validate for XHTML - it looks perfect on Opera / Mozilla & Chrome. But IE messes it up. Basically it uses Divs, & has a left menu, & the main content is a Google map. Also, top menu / banner & a footer at the bottom.. on IE7, the google map is UNDER the list of cities etc (left menu), instead of in the middle / right of the left menu.. Can anyone advise a website listing common IE problems & how web designers can fix it.. Tell me..... I am reading about XHTML now and noticed that it is really no different than HTML. The only difference(s) are, correct me if I'm wrong, that XHTML is more strict with the rules. Lowered-cased letters, properly closed tags, etc, all that mumbo jumbo. If I'm already doing that with HTML, must I need to worry about XHTML? hello friends , I want to know that what is what is XHTML ? plz anybody help me . I want to know about this . Thankx ==== What is the difference between HTML and XHTML? What are the benefits and is it worth learning? Thanx 4 the help! I am a relative novice, so I'd appreciate help please - I have searched the web and other forums, but most answers are too complicated for me. When I started coding a year ago, I used a template file and just worked things out as I went. It happened to have a XHTML 1.1 DTD, but since I didn't even know what a DTD was, I didn't care. It is only recently that I discovered that (1) when I tried to validate I had numerous errors, and (2) virtually non-one uses XHTML 1.1. So now I am considering what Doctype I should use. There seem to be two opinions "out there". I checked out the source code for about 20-30 popular sites and found XHTML 1.0 was used more than twice as often as HTML 4. Many people say XHTML is the way of the future, and requires tighter code, so why not use it? The free WYSIWYG editor I use (NVU) codes in XHTML as default. However others say that some browsers don't handle XHTML well, and unless you need the extra features (and if you don't know what they are then you don't need them - my situation), then HTML 4 is still best - this seems to be the view taken in the excellent "Doctype and validation" topic on this forum. Some people go on to suggest taking a strict line on some of the optional coding rules (e.g. closing all tags) is a good practice, helps prepare you for XHTML, but is still good in HTML. So, what is the common opinion here - HTML4 for "dummies" like me? Thanks. I'm not sure but I think I want to try to migrate to XHTML 2.0. Does anyone know of any analytical tools that look at your existing HTML code and tell you what is not compliant with that standard, making specific recommendations on how to make it compliant? Given how much content I have to update, doing this by hand is out of the question. I need to write a program to parse my files and generate new copies for me. _________________ uk bad credit home mortgage bad credit mortgage Hello everyone. I'm conducting this little experiment for my 3rd year dissertsation project and I need people who know XHTML/CSS to do it. It's online at msin9001.exofire.net and it takes about 30minutes. Note it works best in Mozilla Firefox and - because of my server - may run a little slow at times. If you've got time and a good heart, the contribution would be much appreciated. Thanks alot! Shanba PS If it crashes, try REFRESH not BACK as I'm using PHP postdata. I can't get one of my pages to validate in xhtml, it seems to be the <embed> part which is causing the problems. Here is a link to the page: http://www.a104mc.connwarwicker.co.uk/music.html And here is the section which is causing most of the errors: HTML Code: function playSound(s){ var f = playList[s]; var t = songNames[s]; $('connsplayground').innerHTML = ""; $('connsplayground').innerHTML = "<embed src='http://www.a104mc.connwarwicker.co.uk/sounds/"+f+"' hidden='true' style='width:0px;height:0px;' autostart='true' loop='true' />"; $('songtitle').innerHTML = t; currentSong = s; alterText(); } With such errors as: there is no attribute "src". there is no attribute "hidden" there is no attribute "style" there is no attribute "autostart". etc... I'm using this doc type: HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Any idea as to how i can fix these errors? I've tried using an <object> instead, but that didn't seem to work very well at all. What are the main advantages of using XHTML.. why to prefer for XHTML.. any good idea.. please welcome.. I went to HTML dog and I'm trying to learn through their tutorial. So they gave me this code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>My first web page</title> </head> <body> This is my first web page </body> </html> I typed it into Text edit on my mac and when I open it in safari nothing changes it looks exactly the way I typed it above. I thought it was supposed to just show the "My first web page" and "This is my first web page" This is extremely frustrating. I've checked the code about 30 times and it is the same thing that HTML dog is telling me to write. Mr. R Ok, so I've been struggling trying to get this to validate successfully. Getting the following errors in this image - http://gyazo.com/54aa5ddb894be0204cc2b7a41c7d2176 Here is the code (linked to an external CSS): Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Chapter 3</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <!--embedded styles--> <style type="text/css"> h1{background-color:#eaeaea; color:#000033;} </style> <!--link style sheet--> <link rel="stylesheet" href="style.css" type="text/css" /> </head> <!--Alex Knipfer--> <body> <!--inline style--> <p style="background-color:red; color:white"> This is the paragraph which the background is configured as red and the text is white. (Number 1 Page 107) </p> <h1>Number 2: (Embedded Style)</h1> <p>This text if brown and Verdana Sans-Serif because of the external style sheet that this page is linked to.</p> </body> </html> Thanks, help much appreciated. easy learn html or xhtml? Regards, Ashok. |