473,560 Members | 2,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pocket PC 2003 browser - Javascript getElementsByTa gName failing

Guys,
I want to access all the <div> tags on my page. below is javascript
which is use to access them
var divs=document.g etElementsByTag Name("div");

this works on IE but is failing on Pocket PC 2003 browser.

any of guys faced this problem..any work arounds?

thanks for the help

Jul 23 '05 #1
9 2578


vi**********@gm ail.com wrote:

I want to access all the <div> tags on my page. below is javascript
which is use to access them
var divs=document.g etElementsByTag Name("div");

this works on IE but is failing on Pocket PC 2003 browser.

any of guys faced this problem..any work arounds?


I guess
var divs = document.all.ta gs("div")
will do. But that is just a guess I have no pocket pc here to test.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
VK
On Pocket Internet Explorer you can use only directly addressed div's:

<div id="div1"></div>
and later:
div1.innerHTML = "New content";

You have no evident way to get it by id or from a collection.

Actually all pocket browsers is a fancy mixture of IE 3.0, JavaScript
1.0, some (VERY some) DHTML, a bit of CSS and ALWAYS a pretty good XML
parser.

If you really want to program for PDA's, you have a choice: either use
the forgotten lore of all these tricks for 3rd browsers, or program
directly with XML Island.

Jul 23 '05 #3
thanks Martin.
i got a feeling tht PPC 2003 has different IE version.. checked the
User-Agent & it is IE 4.01..

but still document.all.ta gs("div") is failing ..tried with CAPS
...fails (this should have worked with IE 4)

will try the id way suggested by VK...

any other suggestions
appreciate the help

Jul 23 '05 #4
i m just using the emulator
http://www.microsoft.com/downloads/d...DisplayLang=en

yet to try on real pda ..seems like its goin to be fun

Jul 23 '05 #5
Vk,
these div are built dynamically.
its basically a Question & Answer page (dynamic generation) answers are
radio buttons & checkbox. I need to build the URL to submit the
questions & selected answers for the next page
thanks

Jul 23 '05 #6
FYI,
even this doesnt work
var e1 = document.all[0];
alert(e1);

Jul 23 '05 #7
VK
> even this doesnt work var e1 = document.all[0];

As I told you :-). I have Pocket PC's for 6 year now.

This work though:
....
<div id="que1"></div>
....
que1.innerHTML = newQuestion;

No custom arrays of any kind, sorry (JavaScript 1.0)
You can use native anchors array instead of <div> to hold
question/answers/right answer info:

<a name="Answer1_A nswer_2_Answer_ 3_RightAnswer"> Question</a>
and later document.anchor s[i].name and string functions to extract the
right part.

Or better to use a data island <xml>data</xml>

Jul 23 '05 #8
VK
thanks for ur reply.

sorry i m not very conversent with data island. how do i use data
island for user input??
radio button ..check box?? can i?

thanks again

Jul 23 '05 #9
thanks for the help guys. fixed the problem. below is the javascript .
form.elements works just fine PPC 2003.

var j = 0;
var radio_buttons = new Array();
var radio_buttonnam es = new Array();

for(var i=0; i<questionForm. length; i++){
var temp = questionForm.el ements[i].type;
if((temp == "radio") && (questionForm.e lements[i].checked)) {
radio_buttonnam es[j] = questionForm.el ements[i].name;
radio_buttons[j] = questionForm.el ements[i].value;
j++;
}
}
alert("created arrays");
for(var k=0; k<radio_buttons .length; k++){
qId=radio_butto nnames[k];
answerId=radio_ buttons[k];

queryString=que ryString+"respo nseQuestionId_" +qId+"="+qId+"& responseAnswerI d_"+qId+"="+ans werId+"&";
}

alert(queryStri ng);

Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5461
by: Simba | last post by:
In some pages of my website I use a code like the following: for (var n = 0; n < getTagsArray("SPAN").length; n++){ //SPAN is just an example. I also use other tags tag = getTagsArray("SPAN"); //make something with tag... }
1
1028
by: santhosh_176 | last post by:
:I Created a Pocket PC application for iPAQ 5450. Every thing went fine even installer creation. I could run the setup and install it into the actual device and worked fine. The application enables syncronization with remote database using merge replication. I found contradictory results while installing the application. I will mention here...
2
7506
by: dsnyder | last post by:
This HTML has a bit of Javascript at the end that puts the initial focus on the userID field. It works great on Windows2000 running IE6, but the initial focus never goes to the userID field on Windows 2003 PocketPC (Windows Mobile) running Pocket IE. <html><head><title>WMS - P280WF100 - Login</title><META HTTP-EQUIV='expires' VALUE='0'>...
3
1659
by: rcmail14872 | last post by:
I created a simple Data Access Page and it views fine in Internet Explorer 5.5 on my PC. But when I try to view it on my Pocket PC running Pocket PC 2002 operating system, I get the error message that the page needs Internet Explorer 5.5 or higher to display. Does anyone know if the version of Internet Explorer that comes with Pocket PC 2003...
5
9220
by: Oliver Huppert | last post by:
Hi all, can someone tell me what I need to develop applications for PPC2003 with C#? I have read several meanings about this topic. Do I need Visual Studio .NET or is Visual C# .NET Standard enough?? thanks regards
2
2383
by: Claire | last post by:
Running visual studio .net 2003, Ive created a project for a pocket pc. I want to run it in my pocket pc 2003 emulator because if I use that particular one I can connect the emulator to activesync using some 3rd party software. Visual studio keeps opening up a Pocket pc 2002 emulator (the default device). How can I force Visual Studio to...
0
1768
by: pumaken68 | last post by:
Does anyone has experience with calling web service from pocket pc 2003 project in VS 2005 environment? I just migrated a smart device(pocket pc 2003) solution from VS 2003 to VS 2005. There are 3 projects inside solution: 1. pocket PC 2003 windows form project; 2. Business rules 3. a web service which will be used to download and upload...
6
9549
by: pronerd | last post by:
Hi, I am trying to dynamically set an event handler across frames. I have no problems setting properties across frames doing something like parent.ToolMenuFrame.location.href = 'http://www.blah blah blah.com'; But when I try to set an event handler this way, as shown below, it fails. parent.ToolMenuFrame.window.document.body.onload =...
9
1559
by: rajasekhar | last post by:
Hallo, I am developing a site, and here whats the problem is: how to partition the code, i.e. if I developed 1000 lines of code, in that I want to show first 200 lines only if the user opens my website using IE, and next 200 lines in Firefox, and remaining lines in another browsers. Here am asking that how to compatible the total code...
0
7635
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7556
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7845
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8068
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5176
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1171
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
882
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.