Archive for January 2007

AJAX and window.location.href

see there is a html line like this
<a href=”javascript:void(0);” onClick=”javascript:deleteGroup();”>Delete</a>
the delete group function is written as

function deleteGroup()
{
selectAll(null);
if (groupNames==”" || groupNames==”,”)
{
alert (“No Groups selected”);
return;
}
var a = confirm(“Are you sure you want to delete the selected groups? This change is permanent and this cannot be recovered!”);

if(a)
{
alert(groupNames);
window.location.href=”/final/admin/Egconfiggroupp.jsp?deleteGroups=”+groupNames+”&mode=delete”;
return;
}
}

It is working fine in Firefox but not in IE. Actually the control has been transferred to configgroupp.jsp and what it need to do, has been done. but it is not getting reflected in UI. it is static :( but when you add ” window.event.returnValue=false;” after window.location.href it is workign fine.

function deleteGroup()
{
selectAll(null);
if (groupNames==”" || groupNames==”,”)
{
alert (“No Groups selected”);
return;
}
var a = confirm(“Are you sure you want to delete the selected groups? This change is permanent and this cannot be recovered!”);

if(a)
{
alert(groupNames);
window.location.href=”/final/admin/Egconfiggroupp.jsp?deleteGroups=”+groupNames+”&mode=delete”;
window.event.returnValue=false ;
return;
}
}

What MS site says is, http://support.microsoft.com/kb/190244/en-us ,
The onclick event is overwritten by href tag etc etc….. oops. oh MS associates, why your browser keep on bugging me, while firefox is working fine?


—————————————————
*Free* software is a matter of liberty not price. You should think of “free” as in “free speech”.

Firefox and Ajax: Permission denied to call method XMLHttpRequest.open


Hi,
I was trying to load an xml document from remote server using a html file saved in my hdd. it was working fine in IE, but not with firefox. Firefox says the permission is denied! later i found that Firefox dont allow remote connections to be opened by a local file. http:// or similar kind of things is compulsary to access remote content. Security!

Creating an application with GWT – Application creator

Today I have started with applicationCreator.cmd in the GWT folder!
Adding something important, GWT follows some structure in maintaining projects. As per specification, this is my assumption.
org/vaigai/shiksha – > this is the project root
org/vaigai/shiksha/client ->client side source files
org/vaigai/shiksha/server ->server side code
org/vaigai/shiksha/public ->web resources, public

oh no, dont get tired, the application creator script will do all these for us!

D:\projects\gwt\gwt-windows-1.0.21>applicationCreator.cmd org.vaigai.shiksha.client.myapp Created directory D:\projects\gwt\gwt-windows-1.0.21\src Created directory D:\projects\gwt\gwt-windows-1.0.21\src\org\vaigai\shiksha Created directory D:\projects\gwt\gwt-windows-1.0.21\src\org\vaigai\shiksha\client Created directory D:\projects\gwt\gwt-windows-1.0.21\src\org\vaigai\shiksha\public Created file D:\projects\gwt\gwt-windows-1.0.21\src\org\vaigai\shiksha\myapp.gwt.xml Created file D:\projects\gwt\gwt-windows-1.0.21\src\org\vaigai\shiksha\public\myapp.html Created file D:\projects\gwt\gwt-windows-1.0.21\src\org\vaigai\shiksha\client\myapp.java Created file D:\projects\gwt\gwt-windows-1.0.21\myapp-shell.cmd Created file D:\projects\gwt\gwt-windows-1.0.21\myapp-compile.cmd

Hey, amazing, a hello world is readily available with this newly launched project! see the client folder
Directory of D:\projects\gwt\gwt-windows-1.0.21\src\org\vaigai\shiksha\client 01/26/2007 01:50 AM 1,208 myapp.java 1 File(s) 1,208 bytes

also the hosted mode shell MyApplication-shell and the compiler MyApplication-compile is also issued with the newly created project.
issing the command myapp-shell will launch your program!! :)
coool..

then we can start editing the java, compile, view etc etc....!

so, hereafter lets see thost applications one by one!

for now, bookmark the link
http://code.google.com/webtoolkit

add user query in ms-sql

just for reference. to create a user in ms-sql

sp_addlogin @loginame = ‘bugtracker’, @passwd = ‘bugtracker123′,
@defdb = ‘bugtracker’

defdb refers to default db.

enjoy!