Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Working with javascript on SWT browser yeild the different result from IE on Windows
Working with javascript on SWT browser yeild the different result from IE on Windows [message #546823] Wed, 14 July 2010 10:51 Go to next message
Anakkapan K. is currently offline Anakkapan K.Friend
Messages: 11
Registered: February 2010
Junior Member
I put some javascript code to the page and show it on SWT browser. When I try to execute my javascript code, it return the wrong result. When I debug into the javascript code I found that the element.getAttribute() return the different value from working on IE (it return null on SWT Browser while return a string on IE). Is there any suggestion on this problem or how can I solve it?

My data is like this:
<dfn datasrc='abcdef' title='ABCD'>text here</dfn>

I use the same code (in fact, it is the same page) but when I execute the dfn.getAttribute('datasrc') on IE it return 'abcdef' correctly. But on SWT browser it return 'null' instead. Both browser found the dfn element but only IE can get attribute from it.

I thought that running SWT Browser on Windows using IE as the browser but why the results are different?
Re: Working with javascript on SWT browser yeild the different result from IE on Windows [message #547104 is a reply to message #546823] Thu, 15 July 2010 14:13 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
Hi,

The Browser does embed IE by default on Windows, so I don't know why this
difference would happen. If you log a report with swt at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT
and provide a way of reproducing the problem (the problem page, anything
else that's relevant) then it can be investigated.

Thanks,
Grant


"Anakkapan K." <knock_kknd@hotmail.com> wrote in message
news:i1k4qo$a9c$1@build.eclipse.org...
>I put some javascript code to the page and show it on SWT browser. When I
>try to execute my javascript code, it return the wrong result. When I debug
>into the javascript code I found that the element.getAttribute() return the
>different value from working on IE (it return null on SWT Browser while
>return a string on IE). Is there any suggestion on this problem or how can
>I solve it?
>
> My data is like this:
> <dfn datasrc='abcdef' title='ABCD'>text here</dfn>
>
> I use the same code (in fact, it is the same page) but when I execute the
> dfn.getAttribute('datasrc') on IE it return 'abcdef' correctly. But on SWT
> browser it return 'null' instead. Both browser found the dfn element but
> only IE can get attribute from it.
>
> I thought that running SWT Browser on Windows using IE as the browser but
> why the results are different?
Re: Working with javascript on SWT browser yeild the different result from IE on Windows [message #547228 is a reply to message #546823] Fri, 16 July 2010 03:12 Go to previous message
Anakkapan K. is currently offline Anakkapan K.Friend
Messages: 11
Registered: February 2010
Junior Member
I create the bug on

https://bugs.eclipse.org/bugs/show_bug.cgi?id=320060

This is my first time reporting a bug to eclipse. I'm not sure I do it correctly or not. But, anyway, thank you for your suggestion.
Previous Topic:Specifying Mozilla Version for SWT Browser
Next Topic:INSTALLING SWT ON ECLIPSE UNDER WINDOWS
Goto Forum:
  


Current Time: Mon Nov 24 16:33:48 GMT 2014

Powered by FUDForum. Page generated in 0.06348 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software