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
Double onclick + images within javascript?
Old 01-20-2010, 05:51 AM Double onclick + images within javascript?
Novice Talker

Posts: 8
Trades: 0
http://biologi.atspace.com/index2.htm

Me again:

http://biologi.atspace.com/index2.htm

1) In the events.js-file where you write the longer text part for the tooltip, is it possible to include images somehow for each event within the end of the tooltip?
I thinkt that would make the activities look a bit more interesting to read about.

2) When I click on any yellow event in the calendar, it changes the text to the right. Fine with that. But is it possible to use onclick as a double function?
So that when I click on "START" (bottom left of the calendar) after having pressed any yellow event, it will not only take me back to the right month but also take me back to the start text?
groobelar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-20-2010, 06:11 AM Re: Double onclick + images within javascript?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
is it possible to include images somehow for each event within the end of the tooltip?
It's only HTML, if you add <img src="" .... > it will display an image.

Quote:
But is it possible to use onclick as a double function?
onDblClick is the double click event. BUT make sure you handle the other mouseevents correctly.

http://www.quirksmode.org/js/events_mouse.html#dblclick
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is 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 01-20-2010, 08:32 AM Re: Double onclick + images within javascript?
Novice Talker

Posts: 8
Trades: 0
Quote:
Originally Posted by chrishirst View Post
It's only HTML, if you add <img src="" .... > it will display an image.
But in the events.js file where you write the longer text parts, you can't write regular html to insert pictures. Is there another way?

Also, what I meant with double function onclick was that I want to separate events to happen. One is happening already (bringing me back to the actual month of the calendar), the other I would like to happen is to bring back the first tooltip text that you see when you enter the site.

Last edited by groobelar; 01-20-2010 at 08:35 AM..
groobelar is offline
Reply With Quote
View Public Profile
 
Old 01-20-2010, 08:46 AM Re: Double onclick + images within javascript?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
and event.js looks like?

Can't access it from the site because of some "hotlinking" redirect.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is 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 01-20-2010, 08:52 AM Re: Double onclick + images within javascript?
Novice Talker

Posts: 8
Trades: 0
Quote:
Originally Posted by chrishirst View Post
and event.js looks like?

Can't access it from the site because of some "hotlinking" redirect.
Sorry, it looks like this. For example, at the end of the "test test test test" part I would like to be able to insert a picture, which will occur within the tooltip (to the right) at the homepage.

Code:
// This is the Database of Upcoming Events
// Please Edit with Care.
//
// 8 Fields (surrounded by brackets[]) are used for EACH event:
// 	["Recurring", "Month", "Day", "Year", "Time", "Place", "Name", "Description"]
// 	Each event field must be be surrounded by quotation marks followed by a comma ("",) EXCEPT the "Description" field.
//	The "Description" field is surrounded by quotation marks only ("").
//
// Each event has a comma after the closing bracket IF another event is below it on the next line down.
//	Note: The last event in this file should NOT have a comma after the closing bracket
//
// The Recurring field uses:
//	"D" = Daily; "W" = Weekly; "M" = Monthly; "Y" = Yearly; "F" = Floating Holiday
//
// One Time only events should leave the Recurring field blank
//	(ex. "")
//
// Daily events do NOT require that anything be in the Month Day and Year fields
//	Everything in the Month Day and Year fields will be ignored
//
// Weekly events should have the day of the week field set to 1 - 7
//	1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thurday, 6=Friday, 7=Saturday
//
// "F"loating events uses:
//	the Month field for the Month.
//	the Day field as the Cardinal Occurrence
//		1=1st, 2=2nd, 3=3rd, 4=4th, 5=5th, 6=6th occurrence of the day listed next
//	the Year field as the Day of the week the event/holiday falls on
//		1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thurday, 6=Friday, 7=Saturday
//	example: "F",	"1",	"3",	"2", = Floating holiday in January on the 3rd Monday of that month.
//
//	Note: Easter has it's own special formula so Please don't change anything related to Easter below
//
// "Y"early events are specific dates that never change - the Year field is ignored
//	example - Christmas is: "12","25","",
events = new Array(
	["",	"1",	"20",	"2010",	"Onsdag 20 januari kl. 17:00",	"Här är det tänkt att en beskrivning av samlingsplatsen ska stå.",	"AKTIVITETENS TITEL",	"Nån aktivitet som jag inte tänkt ut än. Nån aktivitet som jag inte tänkt ut än. Nån aktivitet som jag inte tänkt ut. Bara ett exempel på hur det kan se ut."],
	["",	"1",	"24",	"2010",	"Söndag 24 januari kl. 11:00",	"Beskrivning av samlingsplatsen.",	"AKTIVITETENS TITEL",	"test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test."]
// Please omit the final comma after the ] from the last line above unless you are going to add another event at this time.
);
groobelar is offline
Reply With Quote
View Public Profile
 
Old 01-20-2010, 10:28 AM Re: Double onclick + images within javascript?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Code:
test test test test test test test test test test test test test <img src=/"imagepath/" >"
Just escape the quotes in the element markup
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is 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 01-20-2010, 10:38 AM Re: Double onclick + images within javascript?
Novice Talker

Posts: 8
Trades: 0
EDIT: I think it works now
Thanks!

But how come when I have an image that there is so much space after the image, but not when I end without an image?

Last edited by groobelar; 01-20-2010 at 11:03 AM..
groobelar is offline
Reply With Quote
View Public Profile
 
Old 01-20-2010, 10:42 AM Re: Double onclick + images within javascript?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
error messages?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is 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 01-20-2010, 11:39 AM Re: Double onclick + images within javascript?
Novice Talker

Posts: 8
Trades: 0
Something css-related I guess, but I added some image margin-bottom:-20px; to solve the problem
groobelar is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Double onclick + images within javascript?
 

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.31622 seconds with 12 queries