Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2004, 03:13 AM
Takamine334 Takamine334 is offline
 
Join Date: Aug 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default HTML & Javascript problems

I am trying to use javascript when posting certain messages to that when clicked, will open a pop up window.



If you go here: www.everydayjones.com and look at the Upcoming & Previous Shows section, you will see the error I get.



In the headinclude template I have typed this:



Quote:

<script LANGUAGE="JavaScript">

function popUp(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,men ubar=0,resizable=1,width=400,height=400');");

}

</script>


I have also typed that in the vbindex_headinclude template



In the message I have typed in HTML and I have HTML turned on. For the link, I am using this line of code:



Quote:

<a href="javascriptopUp('http://everydayjones.com/msgboard/calendar.php?do=getinfo&e=1&day=2004-8-12&c=1')">The Swiss Pub, Tacoma Wa</a>


Anyone know why I might be getting the error it produces?
Reply With Quote
  #2  
Old 08-18-2004, 03:14 AM
Takamine334 Takamine334 is offline
 
Join Date: Aug 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for some reason after the <a href=" code it is putting the website address and THEN <b></b> and then the rest of the javascript code.

This is weird.
Reply With Quote
  #3  
Old 08-18-2004, 03:34 AM
Modin Modin is offline
 
Join Date: Jun 2004
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<a href="javascript<b></b>:popUp('http://everydayjones.com/msgboard/calendar.php?do=getinfo&amp;e=2&amp;day=2004-9-30&amp;c=1')">The Swiss Pub, Tacoma Wa</a>
that's probably the reason, I grabbed that from your page source.
Reply With Quote
  #4  
Old 08-18-2004, 03:56 AM
Takamine334 Takamine334 is offline
 
Join Date: Aug 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but I'm putting exactly this in the message:

Code:
<a href="javascript:popUp('http://everydayjones.com/msgboard/calendar.php?do=getinfo&e=1&day=2004-8-12&c=1')">The Swiss Pub, Tacoma 
    WA</a>
So, why is it automatically changing it?
Reply With Quote
  #5  
Old 08-18-2004, 09:51 PM
Takamine334 Takamine334 is offline
 
Join Date: Aug 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no one knows? This must be more difficult than previously thought to fix.
Reply With Quote
  #6  
Old 08-19-2004, 03:18 AM
Modin Modin is offline
 
Join Date: Jun 2004
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you post the entire message here? Looks like there's something funny going on in the bbcode parser.
Reply With Quote
  #7  
Old 08-19-2004, 04:21 AM
Takamine334 Takamine334 is offline
 
Join Date: Aug 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this what you wanted? I posted the message in HTML on my board.

Code:
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0" />
<meta name="ProgId" content="FrontPage.Editor.Document" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>New Page 3</title>
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  <tr>
    <td width="50%"><u><b>Upcoming Shows:</b></u></td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">
    <p align="center">&nbsp;</p>
    </td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">
    <p align="right"><u><span style="FONT-WEIGHT: 700">September</span></u></p>
    </td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">
    <p align="left">Thursday, September 30, 2004</p>
    </td>
    <td width="50%" align="right">
    <a href="javascript:popUp('http://everydayjones.com/msgboard/calendar.php?do=getinfo&e=2&day=2004-9-30&c=1')">
    The Swiss Pub, Tacoma WA</a></td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%"><u><b>Previous Shows:</b></u></td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">
    <p align="right"><u><b>August</b></u></p>
    </td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">Thursday, August 12, 2004</td>
    <td width="50%" align="right">
    <a href="javascript:popUp('http://everydayjones.com/msgboard/calendar.php?do=getinfo&e=1&day=2004-8-12&c=1')">
    The Swiss Pub, Tacoma WA</a></td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">
    <p align="right"><u><b>July</b></u></p>
    </td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td width="50%">Saturday, July 10, 2004</td>
    <td width="50%" align="right">
    <p align="right">
    <a href="javascript:popUp('http://everydayjones.com/msgboard/calendar.php?do=getinfo&e=3&day=2004-7-10')">
    The Unicorn Tavern, Ruston WA</a></p>
    </td>
  </tr>
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="50%" align="right">&nbsp;</td>
  </tr>
</table>

</body>

</html>
Reply With Quote
  #8  
Old 08-19-2004, 06:32 AM
Modin Modin is offline
 
Join Date: Jun 2004
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um, what we need is the exact message you post on the message board, such as what you enter in the text field for a new thread that contains this funky link. (unless this is it)
Reply With Quote
  #9  
Old 08-19-2004, 12:20 PM
Takamine334 Takamine334 is offline
 
Join Date: Aug 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah, thats the thread. I'm the admin and I'm the only one that can post in this forum because it supports HTML and I only use HTML for formatting purposes. I also use it for the popup links that will call upon the calendar events. I use to use these popup links on Invision Power Board and it worked fine.

For some reason, after "<A HREF=" it is putting the {board _url} and after "javascript" it is putting <b></b> for some odd reason.

Maybe this is a vbindex problem.
Reply With Quote
  #10  
Old 08-19-2004, 03:46 PM
Modin Modin is offline
 
Join Date: Jun 2004
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try removing

HTML Code:
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0" />
<meta name="ProgId" content="FrontPage.Editor.Document" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>New Page 3</title>
</head>

<body>
and
HTML Code:
</body>

</html>
as they are already outputed by the template.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 07:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04399 seconds
  • Memory Usage 2,264KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (3)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete