User Profile

Collapse

Profile Sidebar

Collapse
Samji
Samji
Last Activity: Jun 9 '07, 07:17 PM
Joined: Dec 22 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Samji
    replied to What is your OS and Python Version
    Python 2.5.1
    Ubuntu 7.04 "Feisty Fawn"
    Scribes (text editor)
    See more | Go to post

    Leave a comment:


  • Samji
    started a topic XMLSchema problem with XML document
    in XML

    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>
    ...
    See more | Go to post

  • Samji
    replied to Append XML with XML DOM
    Thanks.

    Its an iframe, I'm accessing it by ID.
    See more | Go to post

    Leave a comment:


  • Samji
    started a topic Append XML with XML DOM

    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];
    ...
    See more | Go to post

  • Samji
    replied to Inject XML into iframe along with styling
    Hmmm... maybe I can use this: :D

    http://www.htmldog.com/reference/css...es/visibility/...
    See more | Go to post

    Leave a comment:


  • Samji
    replied to Inject XML into iframe along with styling
    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?...
    See more | Go to post

    Leave a comment:


  • Samji
    replied to Inject XML into iframe along with styling
    Thanks. I'll take a look....
    See more | Go to post

    Leave a comment:


  • Samji
    replied to File Upload Status
    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....
    See more | Go to post

    Leave a comment:


  • Samji
    replied to window.open and stylesheet
    Maybe you should address why it takes so long to load....
    See more | Go to post

    Leave a comment:


  • Samji
    started a topic Inject XML into iframe along with styling

    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;
    ...
    See more | Go to post

  • Samji
    replied to regular expression matches in an array
    Thanks for your help. Changing that solved it. :)
    See more | Go to post

    Leave a comment:


  • Samji
    replied to regular expression matches in an array
    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>
    ...
    See more | Go to post

    Leave a comment:


  • Samji
    replied to regular expression matches in an array
    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...
    See more | Go to post

    Leave a comment:


  • Samji
    replied to Can Javascript call up a Javascript
    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....
    See more | Go to post

    Leave a comment:


  • Samji
    replied to regular expression matches in an array
    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....
    See more | Go to post

    Leave a comment:


  • Samji
    replied to regular expression matches in an array
    It supposed to be if any line in the file contains either the "privatemessage " tag or the "fromuserid " tag. Thanks.
    See more | Go to post

    Leave a comment:


  • Samji
    replied to Can Javascript call up a Javascript
    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"/>...
    See more | Go to post

    Leave a comment:


  • Samji
    replied to regular expression matches in an array
    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
       if
    ...
    See more | Go to post

    Leave a comment:


  • Samji
    replied to regular expression matches in an array
    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/);
    ...
    See more | Go to post

    Leave a comment:


  • Samji
    replied to regular expression matches in an array
    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/);
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...