vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   help with a pop-up and database connection (https://vborg.vbsupport.ru/showthread.php?t=75886)

Joe Pimms 02-07-2005 08:36 AM

help with a pop-up and database connection
 
1 Attachment(s)
i have a java script that will do a pop-up for a new window and i started doin a view.php file so when a user selects an item a pop-up will show with all the contents my problem is im haveing problems with making the php file to do that

look at ss1 image this is the code i have:
PHP Code:

<td class='alt2' align='center' width='1%'><a href=\"view.php?$session[sessionurl]serialid=$row[serialid]\"><img src='info.gif' alt='view!' border='0' /></a></td> 

and here is the java script :
PHP Code:

function d(id){ 
window.open('view.php?'+id,'Operate','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=570,height=300');


now in the template code there is this :
PHP Code:

 $stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<
title>$vboptions[bbtitle] - $pagetitle</title>
<
script src="./sys.js"></script>
$headinclude
</head>
<
body>
$header
$navbar
{$_page}
<
br /> 

and in the section part of the template there is this:

PHP Code:

{$pagenav}
<
br/>
<
table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<
thead>
    <
tr>
        <
td class="tcat" colspan='5'>
            <
a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_attatch')"><img id="collapseimg_forumhome_attatch" src="$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
            <
div align='center'>items</div></td>
    </
tr>
</
thead>
<
tbody id="collapseobj_forumhome_attatch" style="{$vbcollapse['collapseobj_forumhome_attatch']}">

<
tr>
<
td class='thead' align='center'>App Name</td>
<
td class='thead' align='center'>Uploaded By</td>
<
td class='thead' align='center'>View Now</td>
</
tr>

$views_now

</tbody>
</
table>
<
br />
{
$pagenav

now look at ss2 this is the template code :
PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
</head>
<
body>
<
table align="center" border="0" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]class="tborder" width="100%">
<
thead>
    <
tr>
        <
td class="tcat" colspan="2">$vbphrase[items_for]$item</td>
    </
tr>
</
thead
<
td class="alt1">$vbphrase[item_number]$itemnum</td>
            </
tr>
            </
table>

<
div align="center"> <br>
  <
input type=submit name=sbm value=Close onClick=window.close()>
  </
span><br>
  
</
div>
</
body>
</
html

please help me im needing help with the database and the view.php file to work

Joe Pimms 02-12-2005 05:46 PM

can i get a little help plz

Jolten 02-12-2005 07:20 PM

Code:

<td class='alt2' align='center' width='1%'><a href="view.php?$session[sessionurl]serialid=$row[serialid]\"><img src='info.gif' alt='view!' border='0' /></a></td>
There's no reference to your javascript function there. Javascript won't work unless you call it.

link should be...

Code:

<a href="javascript: d($row=[serialid]"><img src='info.gif' alt='view!' border='0' /></a>
Since your javascript handles the file name you do not need that in the anchor. What you need is to tell the link to call the javascript and the id number in perenthesis.

You may need to make $row=[serialid] into a singular variable in your php file. i.e. $idnum = $row['serialid']; then use <a href="javascript: d($idnum)"> for the link.

This is all untested.

Joe Pimms 02-13-2005 02:41 AM

can any one else help me plz

Jolten 02-13-2005 03:03 AM

My answer wasn't good enough?

noppid 02-13-2005 03:10 AM

Quote:

Originally Posted by Jolten
My answer wasn't good enough?

Well you are using that 4.2.6 code, so you must be doing it different.


All times are GMT. The time now is 04:59 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.01318 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete