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

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
Jul 23 '05 #2
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

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

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

Jul 23 '05 #5
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

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

Jul 23 '05 #7
> 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
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;
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

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... }
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...
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'>...
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...
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
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...
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...
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 =...
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...
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...
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...
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. ...
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...
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...
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...
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.