PHP - -php Opening Modal Window With Results~
Hi everyone
As a new member I am impressed with the response and how helpful folk are, thanks in advance . I am trying to figure out if I can open a html modal window as soon as a link is clicked.
e.g.
web url link (click this modal window opens in the centre of screen with the results of the query) I don't want to show any info in the toolbar just results of the query ? can this be possible, an example would be handy to see the mechanics of it, are there any browser issues with this ?
thanks again ...singhy
Similar TutorialsThis topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=333559.0 I have a page that will sort my DB table by name and telephone number. And it has a button. I want visitors to be able to input a last name, and have the telephone number provided in a SEPERATE and NEW window after they click the button. Any suggestions for best procedure? My two initial concepts a 1- Make this a form, with the "action" leading to a file like SELECT *FROM myTable WHERE last name="$inputname" and have then use Javascript ONSUBMIT to open a NEW window. (not sure it will succeed as I desire) 2- Make this a simple BUTTON with Javascript pointing everything to the file to process the quiery. PS: I've heard IE doesn't always handle "_BLANK" properly, and I'm unaware of a PHP method. Haven't thought it through entirely, so I'm looking for pointers and advise. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=317921.0 HI have a modal that calls another modal to confirm deletion. On the confirm delete modal i want to show what the user that will be deleted has active in the system. I am passing through the active stuff that they have on the button using data-activesheets="". it all seems to work fine first time around. If you back out of the modals and click another user that doesnt have any active stuff, the modal content does not change. This is the JS that i am using to populate the second modal (with much help from @Barand) $('#userDeleteConfirmationModal').on('show.bs.modal', function(event) { // Button that triggered the modal var button = $(event.relatedTarget) //data elements var userid = button.data('userid') var activesheets = button.data('activesheets').split(", ").join("<br/>") console.log(activesheets); var modal = $(this) modal.find('#deleteUserConfLabel').text(userid) modal.find('#active-sheets-label').text('This user has the following active sheets') modal.find('#active-sheets').html(activesheets) }) I feel like it is setting the values and when it loads for the second time, it does not reset the values or remove them if they should be there. Hi, I was just wondering if it were possible (and if so how) to open a page in a new window when submitting a form via php? E.g. I have a poll on my website that is directed to the reults page by $insertGoTo = "results.php";. This all works but what I want to happen is for when the user clicks submit that the results page displays in a new window (or at the very least a new tab), similar to what would happen when you put a target=_blank on a html link. Any help would be very appreciated. Thanks. Starting with: http://jsfiddle.net/qq441hux/
How do I modal the form to submit the data then close after triggering a " javascript:swapContent(\"help\" " to be ran?
I've been baffled with this for days, and will be running jquery to populate the specific page.
Hi, I am creating my first OOP MVC content management system. I created a CRUD where on the Tag view page, you click edit and it takes you to the Tag edit page. But I want to improve the user experience, so when a user clicks edit, a modal window displays allowing editing of Tag, upon clicking save, modal window closes and AJAX updates Tag view page without refresh. You can see my Tag view.html here which is using Twig template system: {% extends "backendbase.html" %} {% block title %}Manage Tags{% endblock %} {% block body %} <h1 class="ui header">View Tags</h1> {% if tags.errors is not empty %} <div class="ui error message"> <p>Errors:</p> {% for error in tags.errors %} <div>{{ error }}</div> {% endfor %} </div> {% endif %} <table class="ui striped table"> <thead> <tr> <th>Id</th> <th>Tag</th> <th>Directory</th> <th>Synonyms</th> <th>Edit</th> <th>Test</th> <th>Delete</th> </tr> </thead> <tbody> {% for tag in tags %} <tr> <td>{{ tag.id }}</td> <td>{{ tag.tag }}</td> <td>{{ tag.tag_dir }}</td> <td>{{ tag.synonyms }}</td> <td><a class="edit" onclick="return false;" href="../edit/?edit={{ tag.id }}">Edit</a></td> <td><a href="../test/?test={{ tag.id }}">Test</a></td> <td><a href="../delete/?delete={{ tag.id }}">Delete</a></td> </tr> {% endfor %} </tbody> </table> <div class="ui modal"> <i class="close icon"></i> <div class="header"> Edit Tag </div> <div class="image content"> <!--<div class="ui medium image"></div>--> <div class="description"> <!-- <div class="ui header">We've auto-chosen a profile image for you.</div> <p>We've grabbed the following image from the <a href="https://www.gravatar.com" target="_blank">gravatar</a> image associated with your registered e-mail address.</p> <p>Is it okay to use this photo?</p> --> </div> </div> <div class="actions"> <div class="ui black deny button"> Cancel </div> <div class="ui positive right labeled icon button"> Save <i class="checkmark icon"></i> </div> </div> </div> <div class="ui divider"></div> <div class="ui pagination menu"> {% for page in pages %} <a href="{{ page.number|e }}" class="{{ page.isactive|e }}">{{ page.number|e }}</a> {% endfor %} </div> {% endblock %} If I add a form in the modal window with {{ tag.id }} and {{ tag.name }}, nothing displays obviously because it is not in the for in loop. My question is, what is the industry standard way of getting data into this modal window form? I could use a $_GET["id"] but then I am breaking MVC model by including code in template. Is the solution to use JavaScript to get ID from edit link, in the background get data from database then use JavaScript to create form in modal? Your help would be much appreciated! This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318572.0 Scenario :
I would like to open the main program window and at the same time, if a condition is met, open a second - popup window to alert the user of previous information stored in the database.
This is an easy exercise if I use a hyperlink to open th second (popup) window but this is not the process required .
Can someone point me in the right direction ?
Cheers and thanks
I'm wondering what makes a pop-up login window run differently than inside a webpage. I can't seem to get my login system to bring the user back to the page (brings them to a page can't be found) when clicking a form submit button when it is included in the webpage. But if your in the popup page that I'm trying to include, it works no problem so I was wondering if it changes anything. Or if there is some sort of work around (such as embedding a popup window into the webpage). Thanks a lot! I'm planning on writing a library script holding pdf files which will serve the purpose as ebooks in which people could search and open. I don't know for sure, but doubt that you can open a pdf file and make it readable in php. I've noticed adobe reader has managed to do it, and what method do they use to do so? Hey guys, I've been searching the forum, but haven't found a post describing the following problem: I want to Open and Manipulate a word document using the COM class. This is my code so far: $Wrd = new COM("Word.Application"); $DocName = TEMPLATE_DIR.'template.doc'; $Wrd->Application->Visible = True; $WrdDoc = $Wrd->Documents->Open(realpath($DocName)); # do something here $WrdDoc->SaveAs(realpath($DocName)); $Wrd->ActiveDocument->Close(false); $Wrd->Quit(); $Wrd = NULL; There's no problem creating the COM-object, but when i try $WrdDoc = $Wrd->Documents->Open(realpath($DocName)); the browser is either complaining about insufficient memory or will chew on the code for ages... I can see that a temporary word file is created, so it seems that the document has been opened... still, the browser is working and working.... can anyone tell me what's going on? Many Thanks! Hey all, I'm just having a problem with this code.. the local server says it has an error on a particular line that will be pointed out in the coding section. Code: [Select] <?php $hd = fopen('content.txt', 'r'); $line = fgets($hd); $content = array(); while($line) { $word = explode(',', $line); $content [$word[0]] => array('img_path' => $word[1], 'description' => $word[2], 'price' => $word[3]); // the error message is indicating this line is broken!! Is it because of an equal sign missing? I tried putting an equal sign, but still it doesn't run. $line = fgets($hd); } fclose($hd); ?> Your help is greatly needed.. Hi there, I am new to PHP and trying to put my learning together as I progress. Here's the problem: I would like to open HTML file after a certain condition is met. I tried to fopen() but it gave an empty page. Here's the code: Code: [Select] <?php $shape = $_POST['shape']; if($shape=='Triangle') { fopen('ogc_show_triangle.php', 'r'); } else { echo "Select a shape."; } ?> Thanks in advance! ^_^ This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=349781.0 Hi, I'm migrating a site from PHP4 (4.4.6) to PHP5 (5.3.5), am replacing all short open tags, and have many '<?=' opening tags to migrate as well. I saw a reference in the online docs about an equivalent '<?php=' tag, but it doesn't appear to work. What is the best way to 'find and replace' a PHP4 snippet like '<?= $var ?>' into a PHP5, non-short-open-tag equivalent? thanks, Barry Hi. I am working with some rather large files. Sometimes I am just opening a file and trying to find an entry on a single line. Sometimes I am opening a file and working on each line.
Whats the most efficient way to work with a large file?
If I open a file, and place all lines into an array, I will use a lot of memory.
If I open a file, and work on it line by line, I should use much less memory, but will the process take longer?
Whats most efficient?
I have underlined my main question above.
Thanks :-)
Warning: include(): Failed opening 'lang/en.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/name/public_html/db/config.php on line 13What does the for inclusion mean. Line 13: include 'lang/'.$_SESSION['default_lang'].'.php';Thank you. There are no opening and closing tags in the code example of the file PostsController.php in this tutorial:
http://book.cakephp....g/part-two.html
Should I always use opening and closing PHP tags throughout with CakePHP? |