Python 2.5.1
Ubuntu 7.04 "Feisty Fawn"
Scribes (text editor)
User Profile
Collapse
-
XMLSchema problem with XML document
Hello. I have this XML document:
...Code:<?xml version="1.0" encoding="UTF-8" standalone="no"?> <vbtagsconf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vbtags.xsd"> <vbtag name="bold" params="false" group="basic"> <regexp>\[/?b]</regexp> -
-
Append XML with XML DOM
Hi everyone.
I am trying to append the contents of the <message> tag in an XML document to an iframe using the XML DOM.
Here's the code I have:
...Code:var message = msgsfile.getElementsByTagName("message")[msg] .firstChild.nodeValue; alert(message); var writemsg = parent.frames['msgframe']; var writedoc = writemsg.document; var writebody = writemsg.getElementsByTagName("body")[0]; -
Leave a comment:
-
I took a look at those pages and it seems like a lot of extra coding. Is there a way I could just write the whole document out to the iframe and then just hide the contents of the tags I don't want displayed?...Leave a comment:
-
-
I think dfrew means, the text in the same window would be updated every percentage increment.
E.g. "25% done" then "26% done" in the same window.
I don't know very much about perl, but if you can access it via JavaScript, you could print out to a new window with the document.write( ) method....Leave a comment:
-
-
Inject XML into iframe along with styling
Hello everyone.
I am trying to write out the contents of a tag in an XML document to an iframe.
I can do that successfully with the following code...
...Code:function constructMsgBody() { // constuct message body from "message" tags; // write out to iframe on view message dialog var message = msgsfile.getElementsByTagName("message")[msg].firstChild.nodeValue; -
-
For some background, the file I have to read is something like this. Bold are the tags I want to find a match for.
...Code:<privatemessages> <folder name="Sent Items"> [b]<privatemessage>[/b] <datestamp>2006-06-08 18:47</datestamp> <title>Red hyperlinks with CSS?</title> <fromuser>Tommy</fromuser> [b]<fromuserid>[/b]2420</fromuserid>
Leave a comment:
-
Thanks again for your help.
I changed the code like you said (e.g. used lines.length), but I can't get the validation to work correctly. Do you think it is something to do with my for loop. What changes did you make exactly that worked for you?
Additionally, is it possible to use full blown regular expressions in the search method such as looking for exact matches to words or those that contain symbols such as question...Leave a comment:
-
You can't paste that into a JS file because its HTML.
You need to create a script that loads ads on your web page and then reference to the script. If you PM me your email address, I'll send you something I made a while back, which you can easily adapt to suit your purpose....Leave a comment:
-
Thanks. I tried changing to that and it still didn't work. :(
I think I know why I need to break out of the loop after each line has been searched whether or not pmtag or uitag were found. How would I do this after all lines have been searched? Thanks again....Leave a comment:
-
It supposed to be if any line in the file contains either the "privatemessage " tag or the "fromuserid " tag. Thanks.Leave a comment:
-
It sounds like your trying to do something which
involves Cross-site scripting (XSS). It is best to avoid this due to security issues.
It would probably be better for you to use the script from your ad agency which you can store on the same server as your site and then just reference it in your pages as:
[html]
<script language="Javas cript"
type="text/javascript" src="scriptname .js"/>...Leave a comment:
-
Thanks again, acoder. Your help has been priceless. I have this code:
...Code:var isInvalid = true; var eachline; for (eachline = 0; eachline < 20; eachline++) { var pmtag = lines[eachline].search(/privatemessage/); var uitag = lines[eachline].search(/fromuserid/); // if "privatemessage" and "fromuserid" are found in file ifLeave a comment:
-
Thanks I know have this code.
...Code:// check imported file is valid by looking for "privatemessage" // and "fromuserid" tags (not incl. < >) using a regular expression. var eachline; for (eachline = 0; eachline < 11; eachline++ ) { var pmtag = lines[eachline].search(/privatemessage/); var uitag = lines[eachline].search(/fromuserid/);Leave a comment:
-
Thanks I tried doing what you said.
I tried this code:
...Code:// check imported file is valid by looking for "privatemessage" // and "fromuserid" tags (not incl. < >) using regular expressions. var valid = false; var eachline; for (eachline = 0; eachline < 20; eachline++ ) { var pmtag = lines[eachline].search(/privatemessage/);Leave a comment:
No activity results to display
Show More
Leave a comment: