parent

get the parent url of iframe in PHP

 ̄綄美尐妖づ 提交于 2019-12-01 18:40:22
I am creating a widget that would load in a IFrame and users will be able to place the widget on their own website. How would I get the URL of the website that is using the IFrame in javascript and/or PHP? The IFrame loads a php file. I have tried "parent.top.location.href" and "parent.document.referrer" in the IFrame page but that is undefined. I have also tried to echo "$_Server[referrer]" in the IFrame page and that did return the IFrame parent URL, but how easy is it for someone to manipulate the referrer variable? I dont want to get misleading information. The Goal: I created a widget and

Show child element above parent element using CSS

半腔热情 提交于 2019-12-01 15:00:23
I have two divs, one nested inside of the other. The parent element has a defined width/height. How can I show the child div above the parent (outside of it) using only CSS? EDIT: Sorry, maybe I should clarify that I mean "above" as along the z axis. And yes, I already tried z-index. My problem is that when the child element is larger than the parent, it results in a "frame" or "window" effect, cutting off part of the div. Set overflow: visible; on the parent div. #parent { overflow: visible; } Changed to reflect asker's update. You could use the position definition to position it either

fork(), problems with multiple children

淺唱寂寞╮ 提交于 2019-12-01 14:52:21
I edited a little bit : for ( ii = 0; ii < nbEnfants; ++ii) { switch (fork()){ case -1 : { printf("\n\nSoucis avec fork() !!! \n\n"); exit(0); }; case 0 : { EEcrireMp(ii); }break; default : { tabPidEnfants[ii] = p; usleep(50000); ELireMp(nbSect, nbEnfants,tabPidEnfants); }; } } My problem : i get to many child, like a bomb of children spawning. How can i stop those child ? the break should stop it no ? Thanks So, when you fork a process, the new process is an identical copy of the parent, so when your child continues from the if ((pid = fork()) == 0) ... , it will continue out into the for

How to get the parent view of a button within a list adapter?

跟風遠走 提交于 2019-12-01 14:00:05
i`m from brazil and I have a listview that contains buttons images and texts. I'm trying to click on the button listview and get the view responsible for the line I'm clicking. so I can make changes on the line where this my button. what is happening and if the code below, when I click the button, whichever button the list he always does the change in the first list item, and I wanted him to do in their respective line. thus this list IMAGE ------------ --------------- TEXT -- BUTTON IMAGE ------------ --------------- TEXT -- BUTTON IMAGE ------------ --------------- TEXT -- BUTTON IMAGE -----

open iframe fancybox from within an iframe so that it opens in the parent

风格不统一 提交于 2019-12-01 13:56:46
I can get this to work which opens a fancybox IMAGE from within an iframe <a href="javascript:parent.$.fancybox.open({href : 'myurl'});">Open something</a> Problem I have is that I need to open a fancybox IFRAME. Example code or any ideas would be greatly appreciated. Thanks Simply, set type iframe : <a href="javascript:parent.$.fancybox.open({href : 'myurl', type: 'iframe'});">Open something in iframe</a> But you should do it only when you need to have different options, because you can open other page withing iframe like: <a href="myurl">Open something in iframe</a> 来源: https://stackoverflow

Show child element above parent element using CSS

最后都变了- 提交于 2019-12-01 13:50:34
问题 I have two divs, one nested inside of the other. The parent element has a defined width/height. How can I show the child div above the parent (outside of it) using only CSS? EDIT: Sorry, maybe I should clarify that I mean "above" as along the z axis. And yes, I already tried z-index. My problem is that when the child element is larger than the parent, it results in a "frame" or "window" effect, cutting off part of the div. 回答1: Set overflow: visible; on the parent div. #parent { overflow:

How to get the parent view of a button within a list adapter?

陌路散爱 提交于 2019-12-01 13:34:39
问题 i`m from brazil and I have a listview that contains buttons images and texts. I'm trying to click on the button listview and get the view responsible for the line I'm clicking. so I can make changes on the line where this my button. what is happening and if the code below, when I click the button, whichever button the list he always does the change in the first list item, and I wanted him to do in their respective line. thus this list IMAGE ------------ --------------- TEXT -- BUTTON IMAGE --

open iframe fancybox from within an iframe so that it opens in the parent

旧时模样 提交于 2019-12-01 12:31:29
问题 I can get this to work which opens a fancybox IMAGE from within an iframe <a href="javascript:parent.$.fancybox.open({href : 'myurl'});">Open something</a> Problem I have is that I need to open a fancybox IFRAME. Example code or any ideas would be greatly appreciated. Thanks 回答1: Simply, set type iframe : <a href="javascript:parent.$.fancybox.open({href : 'myurl', type: 'iframe'});">Open something in iframe</a> But you should do it only when you need to have different options, because you can

HOWTO access the method declared in the parent class?

时光怂恿深爱的人放手 提交于 2019-12-01 07:06:23
问题 I wonder whether it's possible to access a method declared in a parent class, which has been overrided (Sorry for my English if I make any mistakes). The code snippet: #import <stdio.h> #import <objc/Object.h> @interface Parent : Object -(void) message; @end @implementation Parent -(void) message { printf("\nParent\n"); } @end @interface Child : Parent //-(void) message; @end @implementation Child -(void) message { printf("\nChild\n"); } @end int main(int argc, const char* argv[]) { Parent* p

if checkbox checked add class to parent element

守給你的承諾、 提交于 2019-12-01 05:56:53
I have a table with checkboxes looking like this: <td class="table-col" > <div class="group-one" > <input type="checkbox" /> </div> </td> What I want to do is when the checkbox is checked to apply a "selected" class to "table-col". if ($('.table-col').find(':checked')) { $(this).parent().parent().addClass('selected'); } I looked at many post with a similar solution like above but it doesn't seem work for me. I'm not sure why but this is pointing to HTMLDocument not the element. (edit) On this page there will be marked checkboxes, those which I want to apply "selected". On comments @cimmanon