|
I need to realize drag and drop in Mozilla...
There is event ondragstart in Internet Explorer...
I need to handle such event in Mozilla...
I have table with some text. I need drag it in Mozilla and drop in other application...
How it can be realized???
|
|
|
|
|
I did it myself... For example it can be looking like follow:
<html><br />
<head><br />
</head><br />
<body><br />
<br />
<a href="#" onmousedown='TryDragStart()' onmousemove='DragStart()'><br />
<table><br />
<tr><br />
<td>Row1</td><br />
<td>Row2</td><br />
</tr><br />
</table><br />
</a><br />
<br />
</body><br />
</html><br />
<br />
<br />
<script language="javascript"><br />
<br />
document.onmouseup = DragStop;<br />
<br />
var dragTried = false;<br />
<br />
function TryDragStart()<br />
{<br />
dragTried = true;<br />
}<br />
<br />
function DragStop()<br />
{<br />
dragTried = false;<br />
}<br />
<br />
function DragStart()<br />
{<br />
if (dragTried)<br />
{<br />
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');<br />
<br />
var dragService = Components.classes["@mozilla.org/widget/dragservice;1"].getService(Components.interfaces.nsIDragService);<br />
var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable)<br />
trans.addDataFlavor("text/unicode");<br />
<br />
var textData = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);<br />
textData.data = "Done!!!";<br />
<br />
trans.setTransferData("text/unicode", textData, textData.data.length * 2);<br />
<br />
var transArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);<br />
transArray.AppendElement(trans);<br />
<br />
dragService.invokeDragSession(dragService.TEXT_NODE, transArray, null, dragService.DRAGDROP_ACTION_COPY);<br />
}<br />
}<br />
<br />
</script>
|
|
|
|
|
If this question has been asked previously, I apologize in advance.
Recently (like, in the past week), I was asked to prepare to assume support of an Intranet based application that is in production (mostly ASP).
My web skills are lacking and this is going to significantly stress and grow them. Having said that, is there a product that can 'map' the process flow of a series of pages? Given a start point, can it shows what ASP pages are called, and what they call, etc?
Any help is appreciated.
Tim
-- modified at 9:19 Tuesday 11th April, 2006
|
|
|
|
|
hi!
I am able to generate a report on my PC, however when i access the link to my web application on another machine the report is not generated. The following error message is displayed: Access to the path "C:\DOCUME~1\MAUCBC~1\ASPNET\LOCALS~1\Temp\temp_a1149ad3-f5c3-4be3-abf0-ae6df8eb10c7.rpt" is denied.
i've already included all the reference found in C:\Program Files\Common Files\Crystal Decisions\1.1\Managed
Can anyone help me plz?
Thanks in advance
|
|
|
|
|
|
Hello. Here's my problem:
Let's say I have a computer where I can play mp3 files using a player...winamp or whatever ->this will be my server. I would like to know how I can make a web page where all the users that connect can hear what I am playing and if I change the song here, it should change it at their home also. Any ideas?
Thanks in advance!
|
|
|
|
|
Hey all
I have a textbox with a max length of 5
the first three chars must be uppercase letters between [A-Z]
the final two chars must be between [0-9]
I am trying to do this as a regex function in the onChange Event using Javascript, but my Regular Expressions aren't very good.
currently I split the textbox.text into two string variables
str1 = orgID.substr(0,3);
str2 = orgID.substr(4,5);
Then I run a (very) simple regex expression on each of these substrings.
How would I do this formatting without breaking orgID into 2 substrings?
Thanks for help
Jason
-- modified at 20:23 Monday 10th April, 2006
|
|
|
|
|
You can use direct access to chars:
str.charAt(index);
|
|
|
|
|
I am not sure what you exactly want, but if you only want to test the format of the string you can use:
<br />
var re = /[A-Z]{3}\d{2}/;<br />
<br />
if(re.test(orgID))<br />
{<br />
...<br />
}<br />
Wout Louwers
|
|
|
|
|
This is perfect It is even case sensitive
Thanks alot
Jason
|
|
|
|
|
Hi all,
I am getting this quite an unusual error in my JavaScript script.
What i am trying to do is to increase the height of a DIV named as f4 as follows:
var z = f4.style.height + 22;
f4.style.height = z;
As soon as the second line is executed, i get an error in the browser which says "Invalid Argument" and the height remains unchanged.
Initially i thought that this was happening because i did not mention any height attribute. But it is occuring even after providing the same.
I am really confused.
Any help will be highly appreciated.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
-- modified at 13:21 Monday 10th April, 2006
|
|
|
|
|
The height attribute is a string value, that may contain something like "100px". If you add the value 22 to the string, the value will be converted to a string, and the result will be "100px22". This is of course an invalid value.
Keep the height you want in a variable, and use that variable to produce a value for the style by adding "px" to it (or any unit you like).
---
b { font-weight: normal; }
|
|
|
|
|
Hey Guffa,
You are great man...
I dont know how you always come to my rescue, be it C# or JScript.
That solution indeed solved my problem.
Can you please help me out in one more thing.
Well, i continued making my script and found one strange thing.
I have some DIVs, and their heights are being set by a CSS class. Now if you try to retrieve the height of any of the DIVs, the value returned is blank. I mean nothing is returned. Say, i tried:
alert(f4.style.height);
and this returned a blank alert.
Just before this statement, i added a:
f4.style.height = 22px;
then when i tested, the alert showed the height as 22px.
Is this behaviour normal, or am i going wrong somewhere ?
Please help.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
It's normal. The style that is set using a CSS class is not stored in the style property.
You can use the currentStyle property to get the actual style that is the composite of default styles, css styles and inline styles. It's not part of the standard DOM, though.
---
b { font-weight: normal; }
|
|
|
|
|
Guru,
you are simply marvellous.
That indeed helped.
Thanks again.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
hi, i am doing a project in jsp. but i'm not able to find any good books for jsp. pls suggest some good books or any free e-books which can be downloaded.
thanks
|
|
|
|
|
Hello,
I read about the automatic update Microsoft was to install on April 11th but decided to delay. I understand ActiveX, Flash, and Java applets will be affected by this in that you have to manually activate them before they are usable.
Does the same apply to .NET controls being embedded in a web page? How will those be affected, if at all?
Thanks,
Hashir
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
I want Uploaad a file on host with condition from localost.
Can you help me ?
|
|
|
|
|
With condition? What do you mean by that.
And what part is cousing your troubles?
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi,
Is the javascript code used to create an IFrame correct?
The script is typed in a seperate javascript file and asp.net(vb) code will call the javascript method.
The script below is supposed to display an IFrame on the webpage when the webpage loads.
function showIFrame()
{
var iframe = document.createElement("iframe");
iframe.id = "testiframe";
iframe.name = "testiframe";
iframe.frameborder = 1;
iframe.style.top = 100;
iframe.style.left = 100;
iframe.height = 185;
iframe.width = 175;
iframe.style.position = "absolute";
iframe.style.display = "block";
iframe.scrolling = "auto";
iframe.src = "C:\Test.html"
window.document.body.appendChild(iframe);
return false;
}
However, there is no IFrame displayed when the page loads.
Is there anything wrong with the jscript above?
|
|
|
|
|
|
Hi,
I am developing a web site in ASP.
The problem is simple.
In the Login page I am displaying two text box for UserID and password respectively. One Submit button and one reset button.
Once User enters his ID and Password, User has to click the submit button.
On the FORM's action method I am providing another asp page.
But before request is send to server I want to valid the data entered in the text boxes when User clicks submit button.
How can I do that?
Every thing will come to you if you have faith.
|
|
|
|
|
|