Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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
 
 
Register now for full access!
Old 10-23-2009, 12:36 PM Re: Remove content of a div?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,516
Name: Chris Hirst
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
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
Missing! presumed drunk.

Posts: 41,516
Name: Chris Hirst
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
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: 45
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>
__________________

Please login or register to view this content. Registration is FREE
: 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.20787 seconds with 12 queries