Reply
Remove content of a div?
Old 10-23-2009, 08:26 AM Remove content of a div?
Junior Talker

Posts: 2
Name: Kristian
Trades: 0
Hi,

I'm currently working on a project that needs me to be able to remove content in a div without clicking it.

I know that input's can be handled with the onFocus, but seems like div cant handle onFocus, so what do i do?

Anyone have a small code to solve my problem, or a link to get me on the way?

Kris
NorNerd is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-23-2009, 12:36 PM Re: Remove content of a div?
chrishirst's Avatar
Super Moderator

Posts: 22,318
Location: Blackpool. UK
Trades: 0
And what event/action is going to trigger/require the "removal of the content"?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-23-2009, 04:14 PM Re: Remove content of a div?
Junior Talker

Posts: 2
Name: Kristian
Trades: 0
By a image that is dropped upon it, if that is possible?
NorNerd is offline
Reply With Quote
View Public Profile
 
Old 10-23-2009, 04:22 PM Re: Remove content of a div?
chrishirst's Avatar
Super Moderator

Posts: 22,318
Location: Blackpool. UK
Trades: 0
Surely whatever script you are using for "drag and drop" replaces whatever is in the element anyway?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-01-2009, 10:26 AM Re: Remove content of a div?
freezea's Avatar
Experienced Talker

Posts: 30
Trades: 0
yes, at the top of your page you would do:

$action = $_GET['action'];

Then inside of a script tag you would do this:

<script type="text/javascript">
var action = "<?=$action;?>";

//if you want to remove it you will do
$("#LoginContainer").remove();

//if you want to just hide it so you can maybe show it again later
$("#LoginContainer").hide();
</script>
__________________
RAQ Report: Web-based Excel-like Java reporting tool.
freezea is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Remove content of a div?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13750 seconds with 13 queries