Author Topic: problem  (Read 22450 times)

0 Members and 1 Guest are viewing this topic.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
problem
« Reply #15 on: October 18, 2002, 08:13:36 PM »
I mean add the code for doel.php in index.php like you did with the code for the poll.

2. question:
Save all output into a variable instead of print it directly with echo. This variable can registered as template variable to show the the content in the templates.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
An alternative
« Reply #16 on: October 18, 2002, 08:46:47 PM »
I think I can suggest a MUCH simpler alternative, one that would not require any modification to the 4images or sympoll php code.  The sympoll php code is going expect http post data from the poll form which it will use to generate a results page.  

My suggestion?  Use an <iFrame>.  An inline frame only requires you to edit the template where you want the poll to appear and you can place it in a table cell.

Example:  (assuming sympoll is located at the web's root directory)
Code: [Select]
<iframe src="/sympoll/booth.php" width="150"
height="450" scrolling="no" frameborder="0">
Your browser does not support frames or is currently configured not to display frames.
However, you can still visit <a href="/sympoll/booth.php">the poll page</a></iframe>

Generally speaking, and only in my experience, the percentage of people using browsers that do not support the <iframe> HTML tag is VERY low these days.  If a visitor should happen to come along with such a browser, the message about visiting the poll page and providing a link to it would be displayed instead.  For all others, they would see the poll and the results page.  

I *think*, don't hold me to it, IE 4+ and NN 4.7+ or 4.6+ support the iframe.  So does Mozilla and Opera.  So the only vulnerability is to the small number of people using Netscape at a version less than 4.6 or 4.7.

This is how I'm going to add a poll to my 4images installation.  Far easier don't you think?  

It also makes it much easier to upgrade 4images when new versions become available because you don't have to figure out how to get your custom modification working in the new version if things change.

Yes, I'm sure this works.  I tried it just 4 days ago.

Offline Jaap12

  • Full Member
  • ***
  • Posts: 108
    • View Profile
problem
« Reply #17 on: October 20, 2002, 12:29:19 PM »
yeah, i think that's the best soltution. But it doesn't work with my problem i think,

Here is my problem.

At the first page of my site, i have a dropdown menu, if the visitor have make a choice, then they need to click at the "send"button.

If they have do that, a new page load in with the same design, in that page there i have placed the iframe.

But now the problem is: how do get the results of "send"in a new page and opens in the iframe?

Code: [Select]

<iframe src="doel.php" width="150"
height="450" scrolling="no" frameborder="0">
Your browser does not support frames or is currently configured not to display frames.
However, you can still visit <a href="doel.php">the poll page</a></iframe>


Discription:

first page = page with dropdown menu
second page = same page as the first page, with the iframe menu

I need to get the results from the first page display in the second page, in the i frame. So i can't use php, so i need to do it with javascript or with html??

I think 4images need to be upgraded to fix this big problem.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Need an example
« Reply #18 on: October 20, 2002, 06:50:37 PM »
I don't really understand what your problem is from reading your description.  If it's a poll being displayed in the iframe, then the "submit", "vote" or "view results" button should simply be a part of the poll form that is in the page displayed in the iframe.  

As far as the poll php code is concerned, it is the only page being shown to the user and most polls work by just replacing the poll page with the poll results page.  The fact that it's in an iframe is of no consequence.

If you truly need something triggered from the outer page that causes something in the iframe to change, you can assign a name to the iframe ID attribute and use javascript to code between the two.  

Can you show me an example of what you're trying to do?

Offline Jaap12

  • Full Member
  • ***
  • Posts: 108
    • View Profile
problem
« Reply #19 on: October 20, 2002, 06:53:22 PM »
***

Offline matthew

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://www.seclusion.org
problem
« Reply #20 on: March 30, 2003, 04:32:39 AM »
Chris,

I added the iframe but ran into a problem.

I added the poll using iframe into the left side of 4images, however my problem is it seems to overwrite everything thats on the right side. What I mean is on the right side I should have some text but it seems to overwrite everything.

To see what i'm talking about:
http://www.seclusion.org/index.php?template=polls

As you can see, on the left the poll shows up, however that big black space on the right should have text however it doesn't show it while the iframe is on the right. Not sure how clear this sounds but though you might have some idea?

Matt

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
problem
« Reply #21 on: March 30, 2003, 07:36:06 PM »
That's because your template has invalid HTML

Code: [Select]

                      <p>
</iframe>

                      </p>
                      <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
                        <tr>
                          <td width="100%" bgcolor="#000000">
                                                <iframe src="/sympoll/call_poll.php" width="148" height="270" scrolling="yes" frameborder="1">
                                                <?php
                                          
include&#40;$_SERVER['DOCUMENT_ROOT'&#93;."/sympoll/call_poll.php"&#41;; 
                                         
?>

                                         ;</iframe>


1.  You shouldn't have a closing </iframe> tag appear first.
2.  You should not have a ";" right before the 2nd closing <iframe> tag

Offline matthew

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://www.seclusion.org
problem
« Reply #22 on: March 30, 2003, 08:37:26 PM »
Tried changing what you suggested, same thing happened. Thanks though!

Offline matthew

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://www.seclusion.org
problem
« Reply #23 on: April 03, 2003, 11:51:36 PM »
Managed to get this working now. Was something in the html as you thought.