|
Malcolm Smart wrote: plz give me the codes man that let me do this.
LMGDAO!
OK - it's actually pretty simple. First thing to do is add your div at the correct place on the page. You should be able to work this out ok from your existing stuff, so all you need to do is add a div with position:absolute and top / left style attributes.
Once you have the div on the screen, you need to know if the user holds down the button on it, to start the drag operation. To do this, just add an "onmousedown" attribute which points at a function which just updates a variable to say "we're dragging now", and an onmouseup attribute which does the opposite.
OK - now we need to know when the user is dragging - to do this, we add an onmousemove handler to an appropriate object - ususally the document, but can restrict it to a "canvas" object (like a containing div) which will improve performance - the event is continually fired when moving the mouse, ,so makes sense to try to restrict it a little.
OK, the handler that we need just needs to check if we're holding down the button - which is where the mouse up / down bit comes in. If we're not dragging, then we simply return from the handler without doing anything, but if we ARE holding down the button we need to work out what to do next....
First thing is to get the current size and position of the div. We can get these from the various style attributes. Once we know how big it is currently, we work out where the mouse pointer is from event.clientX / event.clientY. From this, we can work out how wide (or tall) the div needs to be to make it extend to the current mouse position, and update it's style.width attribute.
If you need any more help, send me an email, and will see what I can do
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Cheers Richard - got it working - kindof. Dragging, expanding is fine, just struggling to translate screen position to my 'duration' concept, but that's my problem now!
It will be a neat interface when it is done though (yeah and possibly a CP article, shamelessly taking all your credit) - so thanks for the help.
Thanks again.
Regards
Malc
*********************************************
|
|
|
|
|
No problems - glad you've got it working!
Malcolm Smart wrote: It will be a neat interface when it is done though (yeah and possibly a CP article, shamelessly taking all your credit)
I'd expect no less hehe! Sign of a truly PROFESSIONAL developer !
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Instead of using check boxes to select times, why not use a couple of drop down menus to let them select From time and To time?
Words fade as the meanings change, but somehow, it don't bother me.
|
|
|
|
|
because,i want to develop a distributed system ,
i will need web service ande c++ client ,
i think if keep connection,so it will save so many system resource..
who can help me
|
|
|
|
|
hi! as we know that using hidden fields in web page we can preserves the string values. is there any way to preserve object reference[e.g. popup window reference] in a web page?
samir
|
|
|
|
|
I always thought I'd used hidden fields in the past for this (not just strings), but I can't seem to find anywhere I did so, so I'll go with "stick it into session"
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
RichardGrimmer wrote: I always thought I'd used hidden fields in the past for this (not just strings), but I can't seem to find anywhere I did so
That's because you didn't. It's impossible.
RichardGrimmer wrote: so I'll go with "stick it into session"
That doesn't work either, as the value has to be sent to the server to be stored in a session variable, and you can't send anything but string values to the server.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: That doesn't work either, as the value has to be sent to the server to be stored in a session variable, and you can't send anything but string values to the server.
Hmmmmm.....considerthe following working code snippet from our app....
<br />
DataSet ds = null;<br />
ds = fee.DraftListUnSelectedWIP(draftWriteOff, (string)Session["PEDB"]);<br />
<br />
Session["DraftWriteOffUnselectedWIP"] = ds;<br />
and then at the other end....
<br />
DataSet ds = (DataSet)Session["DraftWriteOffUnselectedWIP"];<br />
which is then bound to a grid, so seems OK. Is there some implicit casting going on that I'm not aware of
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
What you are doing is storing and retrieving an object in a session variable, which all takes place on the server. A window reference exists in the browser, and there is no way that you can transport that reference to the server.
---
b { font-weight: normal; }
|
|
|
|
|
You can keep the value in a Javascript variable as long as the page is loaded, but you can not keep the value if you load an new page.
If you have a frameset, you can store the value in a Javascript variable in the frameset page, and load pages in the frames in the frameset.
---
b { font-weight: normal; }
|
|
|
|
|
The function CoGetClassObjectFromURL, which is used to download the object from the web server.
In IE6, IE7 Beta 2 this works.
In IE7 RC1 it returns a status of E_NOTIMPL!!!!
Is there a work around for this in IE7-land?
(Also posted in COM message board)
http://www.codeproject.com/script/comments/forums.asp?msg=1668115&forumid=1648#xx1668115xx
|
|
|
|
|
Im having a problem with the menu control. Im using framework 2.0 developing a webpage in vb. The menu doesnt show on top of all of the controls. It displays behind them on some of the pages. I need a way to make sure the menu control always displays on top.
|
|
|
|
|
I think this you better put it in asp.net forum there you will get better response for the problem.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Well that's about it. I have a problem with recursion in JavaScript.
I think there's no such a thing in JavaScript. My code doesn't work
correctly , and I think this time I'm not the weak link.
So I just want to know is there recursion in JavaScript ?
I wake up with coding and go to bed with.......well Yu Gi Oh (for now).
-- modified at 15:23 Wednesday 13th September, 2006
I'm awfully sorry. There is recursion in JavaScript.
I'm truly sorry. As usual I made a mistake. Well I'm used to that.
I shouldn't have post that question. What was I thinking ?
So if you don't want to have problems with recursion in JavaScript like me
use the following syntax when using the 'for' operator:
for(var p...
Otherwise you'll have problems.
Include the 'var' part.
I didn't and wasted an hour of debugging.
That's me after 10 hours of coding.
|
|
|
|
|
The variable doesn't have to be declared in the loop. You just have to declare all variables you use locally in the function.
---
b { font-weight: normal; }
|
|
|
|
|
Hello!
I have used server side includes () approach to keep organized my web pages because of some sort of complexity.
I have called "menus" what consits in several images in one of the file which is an html page within javascript. What I want is to load images of the menus first when the main page gets called. However, the the file I have included has its own HTML tags (htm,body etc.) and it is not loading the images first because of more than one file has been proccesed at same time.
How can I solve this problem with not changing the approach?
Thank You!
|
|
|
|
|
I did't understand much of what you tried to explain. Please try again.
---
b { font-weight: normal; }
|
|
|
|
|
Let me try a different way to explain my aim. There are 3 asp files and one main.asp file and all files also have their own HTML tags.
Lets say that second asp file has also some images in it and this file has been included in main.asp file with server side include method. How could I load the images first when main.asp file gets called?
|
|
|
|
|
Do you mean that you want the browser to load the images in the part of the page that comes from the included file before loading the images in the rest of the page?
There really isn't any way that you can control the order in which the browser will be loading the images of a page. Also, the browser has no way of telling which part of the page is coming from an included file.
If you want some images to load first you can remove the other images from the page, and in the onload event of the body tag put some Javascript code that adds the images to the page. That way they will not be added until the first images are fully loaded.
---
b { font-weight: normal; }
|
|
|
|
|
Hi all.
actully i don't find a tutorial for to begin with Google Web Toolkit.
all a found an advanve small examples.
is there any help - like Pdf help
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
hi everyone.
I am really disappointed from microsoft as they havent provided any help/ proper documentation on WSE 3.0 or even 2.0.
Now i wanted to decrypt the data received via a web service using AES/ AES128 or any version of AES. And i am not getting a single clue of how to do it. i tried to use its "EncryptionFormatter" property and use its decrypt method. but it throws a big exception.
I also tried to use the "KeyBytes" property and assinged the key in bytes but it still throws a big exception of some "length is greater" etc.
If any one has ever used AES in dot net or even any other symmetric cipher for encrption/ decryption then please let me know of how to use it in .Net.
Even a small idea is appreciated.
regards
|
|
|
|
|
Hi,
I'm trying to set the class of an element on my page w/ javascript like this:
function ResetNavigation(element)
{
element.className = "active";
}
However, the effects of the active class are not showing up. When I add this code to the above snippet, it is confirmed that the active is being set as the element's class value.
alert(element.className);
Why won't my style render in the browser?
/\ |_ E X E GG
|
|
|
|
|
That is impossible to tell with so little information.
What does the relevant css look like? What kind of element is it? What effects is it that you expect to show up? How, where and when do you call the Javascript function?
---
b { font-weight: normal; }
|
|
|
|
|
I think I just found out what's wrong. I was using a script.aculo.us effect before I set the element's class and it looks like script.aculo.us was setting that elements background to white using it's style attribute which has precedence over class tags.
Although, I'm not sure how to fix THIS...
/\ |_ E X E GG
|
|
|
|