Yes, i finally manage to do it by defining
BYTE e = 0x0A;
Thanks...
User Profile
Collapse
-
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)
-
Thank you all for your replies.
Yes,
str.split("\\|" );
works perfectly.
Thanks again.. :DLeave a comment:
-
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("|");
-
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.
GordonLeave a comment:
-
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.
...Leave a comment:
-
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 -
-
-
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... -
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;...Leave a comment:
-
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...Leave a comment:
-
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...Leave a comment:
-
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.Leave a comment:
-
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>...
No activity results to display
Show More
Leave a comment: