User Profile

Collapse

Profile Sidebar

Collapse
spoken
spoken
Last Activity: Jan 7 '11, 04:59 PM
Joined: Oct 24 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • spoken
    replied to Embedded C: defining a BYTE?
    in C
    Yes, i finally manage to do it by defining
    BYTE e = 0x0A;

    Thanks...
    See more | Go to post

    Leave a comment:


  • spoken
    started a topic Embedded C: defining a BYTE?
    in C

    Embedded C: defining a BYTE?

    Hi,

    I'm having problem defining a BYTE in this embedded C application that I writing.

    I know that the byte representation for carriage return is : A0

    What I'm doing is:
    Code:
    BYTE enterKey = AO;
    ConsolePutROMString( (ROM char *)"LISTEN TO KEYBOARD\r\n" );
        if(ConsoleIsGetReady()){
              keyboard = ConsoleGet();								
             while(!keyboard==enterKey)
    ...
    See more | Go to post

  • spoken
    replied to Can't do str.split("|") ?
    in Java
    Thank you all for your replies.

    Yes,
    str.split("\\|" );
    works perfectly.

    Thanks again.. :D
    See more | Go to post

    Leave a comment:


  • spoken
    started a topic Can't do str.split("|") ?
    in Java

    Can't do str.split("|") ?

    Hi,

    I'm trying to read a file with data seperated by "|" character.
    Ex:
    3578.27|2001|Ro ad Bikes|Metchosin |Canada
    3399.99|2001|Mo untain Bikes|Pantin|Fr ance
    3399.99|2001|Mo untain Bikes|Lebanon|U nited States

    After reading the first line, I'm trying to split the string into an array by doing
    Code:
    String[] x = str.split("|");
    However java see...
    See more | Go to post

  • spoken
    replied to Linking to "home.htm?id=1" ?
    Yes, you were right.
    I could just use getURL("home.ht m?id=1")

    The problem was that that didn't work when I tried to run it on my computer but it works when put it up in the web server.

    Thanks.
    Gordon
    See more | Go to post

    Leave a comment:


  • spoken
    replied to Linking to "home.htm?id=1" ?
    Hi,

    What I'm doing is that I have created 1 page, home.htm. And based on the id, I will populate different data in that page from my XML. So home.htm?id=1 gets a different set of data from home.htm?id=2.

    So, basically there is no physical page call "home.htm?id=1" , hence when I do getURL("home.ht m%3Fid=1"), flash cannot find the file and give me a "404-page not found" error.

    ...
    See more | Go to post

    Leave a comment:


  • spoken
    started a topic Linking to "home.htm?id=1" ?

    Linking to "home.htm?id=1" ?

    Hi,

    How can I link to "home.htm?i d=1" ? I have tried to use
    getURL("home.ht m%3Fid-=1") and getURL("home.ht m?id-=1")
    but it doesn't work because flash looks for the physical file which doesn't exist because I'm using the parameter id=1 to generate some values in my page.

    Thanks in advance.

    Gordon
    See more | Go to post

  • Ok, Thanks for the reference.
    See more | Go to post

    Leave a comment:


  • Thanks. I didn't know about that one.

    Regards,
    Gordon
    See more | Go to post

    Leave a comment:


  • spoken
    started a topic Is it possible to have "something.html?id=1" ?

    Is it possible to have "something.html?id=1" ?

    Hi,

    is it possible to create a html with variables, like "www.site.c om/category.html?i d=type1"?
    I wanna do this because I'm using a little ajax in my html and I have created a category.html page already. So depending on my variable, "id=type1", I will populate my category page with the data of type1 or type2 or type3 from my xml.

    If it is possible, what is the javascript syntax to extract the...
    See more | Go to post
    Last edited by spoken; Oct 25 '07, 06:26 AM. Reason: typo

  • spoken
    replied to How do I extract data from XML
    Wow..
    Thank you so much Ferris.. I was going around in endless circles trying to transverse my XML file.

    I guess the code that I didn't manage to get was:

    [CODE=javascript] var p = xmldoc.getEleme ntsByTagName('r ock');
    if (p[0].childNodes.len gth) {
    var child1 = p[0].getElementsByT agName('item')[0]; //child1 => item 0
    var c_name = child1.getEleme ntsByTagName('n ame')[0].firstChild.nod eValue;...
    See more | Go to post
    Last edited by gits; Oct 24 '07, 08:13 PM. Reason: added code tags

    Leave a comment:


  • spoken
    replied to How do I extract data from XML
    Hi Gits,

    I tried your code adaption. I can't do child1.getAttri bute('name') because name is not an attribute but a tag. However if I do child1.getAttri bute('id'), I can extract the ID of the item.

    But I need to get the value of the <name> tag.. :(

    This is driving me bonkes.. Thanks for the help...

    Regards,
    Gordon...
    See more | Go to post

    Leave a comment:


  • spoken
    replied to How do I extract data from XML
    Hi debasis,

    Thanks for your reply.
    I've tried your code and I can't get any output. This is wat I wrote.

    [CODE=javascript]var parent = xmldoc.getEleme ntsByTagName('r ock'); //get the parent node
    alert(parent);
    if(parent[0].childNodes.len gth){
    var child1 = parent[0].childNodes[0].getAttribute(' name'); //if there is any child nodes
    }
    alert(child1);[/CODE]

    I get...
    See more | Go to post
    Last edited by gits; Oct 24 '07, 12:06 PM. Reason: added code tags

    Leave a comment:


  • spoken
    replied to How do I extract data from XML
    Hi acoder,

    I've seen that link. However, I just want to get the 'name' for the items in <rock>.
    I have tried
    xmldoc.getEleme ntsByTagName('i tems')
    but that gives me all the items, including those in <pop>.

    dmjpro,
    the file is a seperate xml and the javascript is in my html document. I manage to successfully load the xml already.
    See more | Go to post

    Leave a comment:


  • spoken
    started a topic How do I extract data from XML

    How do I extract data from XML

    Hi,

    I quite new to Javascript and XML. Here a is snippet of my XML file.

    [CODE=xml]<xml>
    <cd>
    <rock>
    <item id='1'>
    <name>Bon Jovi</name>
    <price>$10</price>
    <description>ab c</description>
    </item>
    <item id='2'>
    <name>U2</name>
    <price>$11</price>...
    See more | Go to post
    Last edited by acoder; Oct 24 '07, 09:42 AM. Reason: Added code tags
No activity results to display
Show More
Working...