Search Results

Search found 4668 results on 187 pages for 'font'.

Page 115/187 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • PHP URL parameters append return special character

    - by Alexandre Lavoie
    I'm programming a function to build an URL, here it is : public static function requestContent($p_lParameters) { $sParameters = "?key=TEST&format=json&jsoncallback=none"; foreach($p_lParameters as $sParameterName => $sParameterValue) { $sParameters .= "&$sParameterName=$sParameterValue"; } echo "<span style='font-size: 16px;'>URL : http://api.oodle.com/api/v2/listings" . $sParameters . "</span><br />"; $aXMLData = file_get_contents("http://api.oodle.com/api/v2/listings" . $sParameters); return json_decode($aXMLData,true); } And I am calling this function with this array list : print_r() result : Array ( [region] => canada [category] => housing/sale/home ) But this is very strange I get an unexpected character (note the special character none*®*ion) : http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none®ion=canada&category=housing/sale/home For information I use this header : <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <?php header('Content-Type: text/html;charset=UTF-8'); ?> EDIT : $sRequest = "http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none&region=canada&category=housing/sale/home"; echo "<span style='font-size: 16px;'>URL : " . $sRequest . "</span><br />"; return the exact URL with problem : http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none®ion=canada&category=housing/sale/home Thank you for your help!

    Read the article

  • Does className exist in Mootools ?

    - by anna mae
    Hi, I want to update this very simple JS to Mootools 1.2 and it's not easy. This function : function changeclass(x){ document.getElementById("content").className = "ziclass0"; document.getElementById("content").className = "ziclass" + x; } is triggered in the DOM by : <div id="someclass"> a href="javascript: changeclass(0)">Unstyled</a a href="javascript: changeclass(1)">link one</a a href="javascript: changeclass(2)">link two</a a href="javascript: changeclass(3)">link three</a </div> to call the according CSS classes like : .ziclass1 h1{ color: rgb(142,11,0); font-family: Verdana; font-size: 2.5em; letter-spacing: 0.1em; } and changes the layout accordingly in : <div id="content" class="ziclass3"> ... </div> I know I can add an event to the triggers like : $(#someclass.each(function(element,index) { element.addEvent('click', function(){ //some code }); But, how do I get #content class classname ? Through an array ? I am a bit confused here. I'd be really grateful for any help to set me on the right track

    Read the article

  • jquery drag and drop

    - by eba
    I'm using JQuery draggable. If a table is in div then I can move this div with the table. When there is an input-button in the div then it doesnt move. Why? $(".multidraggable").draggable(); doesnt work: <div class="multidraggable" style="display: inline-block;"> <input type="button" value="????? ?? &#10; ??????????? ????? &#10; ??? ??? &rdquo;??????&rdquo;" id="button1" style="font-family:arial; width: 200px; height: 80px;max-height:80px;max-width:200px; font-size:15" /> </div> works: ...

    Read the article

  • Firefox adding padding to first image in multiple images, although all images have same styling and size.

    - by Sam Gabriel
    Hey guys, I have this piece of code: while($uno=mysql_fetch_assoc($results)) { echo '<div class="wcapt"><a class="neutral" href="../images.php?id=' . $uno['id'] . '"><img class="pad" src="'. $uno['thumbs'].'" border="0" /></a><br/><center><p>'.$uno['name'].'</p></center></div>'; } And all the images I link to have exactly the same size. Here's the Mainstyles.css div.wcapt { border: 1px solid green; float: left; padding: 0; margin: 3px; font: 11px/1.4em Arial, sans-serif; color: gray; } img.pad { padding: 5px; } a.neutral { display: inline; font-weight: normal; text-transform: none; background-color: transparent; color: white; text-decoration: none; } The problem is that Firefox adds some extra padding to the first image, and only the first image. And this is really annoying. Here's a screenshot of the page:

    Read the article

  • PHP: Making my code simpler/shorter welcome message

    - by Karem
    Any suggestion to make this welcome message shorter: <?php if(isset($_SESSION['user_id'])) { if(isSet($_SESSION['1stTime'])){ ?> <strong id="welcome" style="font-size: 10px;"> <a href="logout.php"> Logga ut </a> </strong> <?php }else{ $_SESSION['1stTime'] = time(); ?> <script> $(document).ready(function() { $("#welcome").fadeIn("slow"); setTimeout(function(){ $("#welcome").fadeOut("slow"); setTimeout(function(){ $("#welcome").html("<a href='logout.php'>Logga ut</a>"); $("#welcome").fadeIn(); }, 800); }, 5000); }); </script> <strong id="welcome" style="display: none; color: #FFF; font-size: 10px;">Hej, <?php echo $FULL; ?>!</strong> <?php } } ?> First it checks if you are signed in. Next if 1stTime is set, if it is then show "Log out" in swedish, if it isnt, then introduce with "Hi, NAME", and then change to "Log out" after 5 seconds(jquery) + set the session How can i make this simpler?

    Read the article

  • JQuery validate e-mail address regex

    - by RussP
    Hi folks, not too sure about how to do this. I need/want to validate email addresses by regex using something like this: [a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum) Not I need to run this in a JQ function like this: Where does the validation go and wht is the expression? - please $j("#fld_emailaddress").live('change',function() { var emailaddress = $j("#fld_emailaddress").val(); // validation here? if(emailaddress){} // end validation $j.ajax({ type: "POST", url: "../ff-admin/ff-register/ff-user-check.php", data: "fld_emailaddress="+ emailaddress, success: function(msg) { if(msg == 'OK') { $j("#fld_username").attr('disabled',false); $j("#fld_password").attr('disabled',false); $j("#cmd_register_submit").attr('disabled',false); $j("#fld_emailaddress").removeClass('object_error'); // if necessary $j("#fld_emailaddress").addClass("object_ok"); $j('#email_ac').html('&nbsp;<img src="img/cool.png" align="absmiddle"> <font color="Green"> Your email <strong>'+ emailaddress+'</strong> is OK.</font> '); } else { $j("#fld_username").attr('disabled',true); $j("#fld_password").attr('disabled',true); $j("#cmd_register_submit").attr('disabled',true); $j("#fld_emailaddress").removeClass('object_ok'); // if necessary $j("#fld_emailaddress").addClass("object_error"); $j('#email_ac').html(msg); } } }); });

    Read the article

  • How to change the link color of the current page with CSS

    - by Josh Curren
    How do I display the link for the current page different from the others? I would like to swap the colors of the text and background. This is what I currently have: The HTML: <div id="header"> <ul id="navigation"> <li class="bio"><a href="http://www.jacurren.com/">Home</a></li> <li class="theatre"><a href="http://www.jacurren.com/theatre.php">Theatre</a></li> <li class="prog"><a href="http://www.jacurren.com/programming.php">Programming</a></li> <li class="resume"><a href="http://www.jacurren.com/resume.php">R&eacute;sum&eacute;</a></li> <li class="portf"><a href="http://www.jacurren.com/portfolio.php">Portfolio</a></li> <li class="contact"><a href="http://www.jacurren.com/contact.php">Contact</a></li> </ul> </div> The CSS: #navigation{ margin:0; padding:0; background:#000000; height:34px; list-style:none; position: relative; top: 80px; } #navigation li{ float:left; clear:none; list-style:none; } #navigation li a{ color:#A60500; display:block; font-size:12px; text-decoration:none; font-weight:bold; padding:10px 18px; } #navigation li a:hover{ color:#640200; background-color:#000000; }

    Read the article

  • Javascript to fire event when a key pressed on the Ajax Toolkit Combo box.

    - by Paul Chapman
    I have the following drop down list which is using the Ajax Toolkit to provide a combo box <cc1:ComboBox ID="txtDrug" runat="server" style="font-size:8pt; width:267px;" Font-Size="8pt" DropDownStyle="DropDownList" AutoCompleteMode="SuggestAppend" AutoPostBack="True" ontextchanged="txtDrug_TextChanged" /> Now I need to load this up with approx 7,000 records which takes a considerable time, and effects the response times when the page is posted back and forth. The code which loads these records is as follows; dtDrugs = wsHelper.spGetAllDrugs(); txtDrug.DataValueField = "pkDrugsID"; txtDrug.DataTextField = "drugName"; txtDrug.DataSource = dtDrugs; txtDrug.DataBind(); However if I could get an event to fire when a letter is typed instead of having to load 7000 records it is reduced to less than 50 in most instances. I think this can be done in Javascript. So the question is how can I get an event to fire such that when the form starts there is nothing in the drop down, but as soon as a key is pressed it searches for those records starting with that letter. The .Net side of things I'm sure about - it is the Javascript I'm not. Thanks in advance

    Read the article

  • how to achieve this single line css format....

    - by metal-gear-solid
    I tried many formats but this is best to find classes and IDs easily without using "Find". but it is good if width of editor is wide. I use this tool to format my css in single line http://www.newmediacampaigns.com/files/posts/css-formatting/clean.php #wrapper {width:800px; margin:0 auto;} #header {height:100px; position:relative;} #feature .post {width:490px; float:left;} #feature .link {width:195px; display:inline; margin:0 10px 0 0;float:right;border-bottom:1px solid red} #footer {clear:both; font-size:93%; float:none;} I need like this. see selector #feature .link i need if any selector has more than 3 properties then it should go at next line like in this example.because i work in cms where width of textbox where i write cssis not much wide. Is there any tool/software can format CSS like this. or after getting single line format can we this formatting for big lines. in automated way #wrapper {width:800px; margin:0 auto;} #header {height:100px; position:relative;} #feature .post {width:490px; float:left;} #feature .link {width:195px; display:inline; margin:0 10px 0 0; float:right;bottom:1px solid red} #footer {clear:both; font-size:93%; float:none;}

    Read the article

  • JQuery use variable by name of divID

    - by Russell Parrott
    Just a quick question, that I cannot fathom out, hope you guys and girls can help. I have a div (with ID) that when clicked opens a new div - great works well, what I really want is to "populate" the new div with predefined text based on the clicked div's ID. example: <div class="infobox" id="help_msg1">Click me</div> I may have say 3 (actually more but...) of these div's This opens: <div id="helpbox">text in here</div> In/on my .js page I have doc ready etc then: var help_msg1 ='text that is a help message'; var help_msg2 ='text that is another help message'; var help_msg3 ='text that is yet another help message'; Then $('.infobox').live('click',function() { $('#helpbox').remove(); $('label').css({'font-weight': '400'}); $(this).next('label').css({'font-weight': '900'}); var offset = $(this).next().next().offset(); var offsetby = $(this).next().next().width(); var leftitby = offset.left+offsetby+10; $('body').append('text in here'); $('#helpbox').css( { 'left': leftitby, 'top': offset.top } ); }); Note I remove each #helpbox before appending the new one and the .next().next() identifies the appropriate text input that lot all works. What I need is how do I put var help_msg1 into the append when id="help_msg1" is clicked or var help_msg2 when id="help_msg2" is clicked etc. I have tried

    Read the article

  • Concerned with footerrow in gridview

    - by ramyatk06
    hi guys, I have following gridview. <asp:GridView ID="gvMarks" runat="server" AutoGenerateColumns="false" DataKeyNames="MarkId" Width="80%" onrowdatabound="gvMarks_RowDataBound" ShowFooter="True" onrowcommand="gvMarks_RowCommand"> <Columns> <asp:TemplateField> <HeaderTemplate> SubjectCode </HeaderTemplate> <FooterTemplate> <asp:DropDownList ID="dlSubjectCode" runat="server" width="100px" AutoPostBack="false"></asp:DropDownList> </FooterTemplate> </asp:TemplateField> <asp:TemplateField> <HeaderTemplate> Mark </HeaderTemplate> <FooterTemplate> <asp:TextBox ID="txtInternalMark" runat="server" ></asp:TextBox> </FooterTemplate> </asp:TemplateField> <asp:TemplateField> <HeaderTemplate> Insert </HeaderTemplate> <FooterTemplate> <asp:LinkButton ID="lnkInsert" runat="server" Text="Insert" CommandName="Insert" ></asp:LinkButton> </FooterTemplate> </asp:TemplateField> </Columns> <FooterStyle BackColor="White" ForeColor="#000066" /> <RowStyle ForeColor="#000066" /> <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /> <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /> </asp:GridView> If i enter some value in txtInternalMark,iam not geting its value in code behind.Iam geting the value as "".Iam using following code if (e.CommandName.Equals("Insert")) { TextBox txtInternalMark = (TextBox)gvMarks.FooterRow.FindControl("txtInternalMark"); lblMessage.Text = txtInternalMark .Text; } Can anybody help to get the value of textbox in codebehind.

    Read the article

  • Javascript not working in firefox

    - by Samuel Meddows
    Hi guys, I have a PHP form validation function that I developed in chrome and now will not work in firefox or Opera. The function checks to see if a section of the form is blank and shows and error message. If there is no error then then the form submits through document.events.submit(); CODE: function submit_events() { //Check to see if a number is entered if the corosponding textbox is checked if (document.events.dj_card.checked == true && dj_amount.value==""){ //Error Control Method //alert ('You didn\'t enetr an Amount for DJ\'s Card!'); var txt=document.getElementById("error") txt.innerHTML="<p><font color=\"#FF0000\"> You didn\'t enetr an Amount for DJ\'s Card!</font></p>"; window.document.getElementById("dj_card_label").style.color = '#FF0000'; //Reset window.document.getElementById("company_amount_label").style.color = '#000000'; window.document.getElementById("own_amount_label").style.color = '#000000'; }else{ document.events.submit(); } The document.events.submit();does work across all my browsers however the check statements do not. If the box is not ticked the form submits. If the box is ticked it does not matter whether there is data in the dj_amount.value or not. The form will not submit and no error messages are displayed. Thanks guys.

    Read the article

  • Is it possible to embed a flash player in a table and retain the table properties

    - by user1494241
    I'd like to embed a music (flash) player in a table with clickable images but the embed code seems to throw the table properties off - it extends the width of the table. Is it possible to embed the player on the same row as the image whilst still retaining the table width? Here's what I've been using: <table width="620" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div align="left"><object height="18" width="100%"> <param name="movie" value="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F1253725&amp;auto_play=false&amp;player_type=tiny&amp;font=Georgia&amp;color=9a6600&show_playcount=false&default_width=375&default_height=40&show_user=false"></param> <param name="allowscriptaccess" value="always"></param> <param name="wmode" value="transparent"></param><embed wmode="transparent" allowscriptaccess="always" height="18" src="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F1253725&amp;auto_play=false&amp;player_type=tiny&amp;font=Georgia&amp;color=9a6600&show_playcount=false&default_width=375&default_height=40&show_user=false" type="application/x-shockwave-flash" width="100%"></embed> </object> </td> <td> <div align="right"><img src="http://dl.dropbox.com/u/31856944/Virb/splash_freedownload-2.png" border="0" width="245" height="42" usemap="#Map" /></div> </td> <tr> <td> <div align="right"><img src="http://dl.dropbox.com/u/31856944/Virb/splash_share-2.png" border="0" width="620" height="31" usemap="#Map2" /></div> </td> </tr> </table>

    Read the article

  • PDFBox: Problem with converting pdf page into image

    - by user552910
    My mission is pretty simple: converting every single page of a pdf file into images. I tried using icepdf open source version to generate the images but they don't generate the image with the correct font. So I start using PDFBox instead. The code is the following: PDDocument document = PDDocument.load(new File("testing.pdf")); List<PDPage> pages = document.getDocumentCatalog().getAllPages(); for (int i = 0; i < pages.size(); i++) { PDPage singlePage = pages.get(i); BufferedImage buffImage = convertToImage(singlePage, 8, 12); ImageIO.write(buffImage, "png", new File(PdfUtil.DATA_OUTPUT_DIR+(count++)+".png")); } The font looks good, but the pictures within the pdf file look fainted out (See the attachment). I look into the source code but I still have no clue how to fix it. Do you guys have any idea what's going on? Please help. Thanks!!

    Read the article

  • How do I add descriptive text to form link .gif ?

    - by erynion
    I want to make the descriptive text around a form link also open the form. I want to make it so you can click on "Some Text Here" (below) and open the form on somesomite.com just as if you clicked on the image below this text (somebut.gif, below) <DIV style="position: absolute; top:10px; right:10px; width:70px; height:25px"> <font color="white"><b>Some Text Here<b></font> </div> <DIV style="position: absolute; top:50px; right:10px; width:70px; height:25px"> <form action="https://www.somesite.com/cgi-bin/something" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="image" src="https://www.somesite.com/somebut.gif" border="0" name="submit"> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----LONG_KEY...> </form> </div> Thanks

    Read the article

  • How to paginate json data?

    - by Pandiya Chendur
    I used json data and iterated div elements to get my result.... function Iteratejsondata(HfJsonValue) { //var jsonObj = eval('(' + HfJsonValue + ')'); var jsonObj = JSON.parse(HfJsonValue); for (var i = jsonObj.Table.length - 1; i >= 0; i--) { var employee = jsonObj.Table[i]; $('<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Address + '</span></div>').insertAfter('#ResultsDiv'); } $(".resultsdiv:even").addClass("resultseven"); $(".resultsdiv").hover(function() { $(this).addClass("resultshover"); }, function() { $(this).removeClass("resultshover"); }); } I get 22 records in total... Now i want to paginate these divs (i.e) 5 divs per page... Any suggestion...

    Read the article

  • Liftweb Menu customization

    - by DataSurfer
    I want to create a menu that looks like: HOME | FOO | BAR | ABOUT | CONTACT How might I go about doing this? Here is what I have tried: <lift:Menu.builder ul:class="menu" li_item:class="current" /> and ul.menu li { display: inline; list-style-type: none; text-transform: uppercase; border-right: 1px solid white; padding-right: 5px; } li.current span { background: white; color: black; padding: 5px 5px 3px 5px; font-size: 11px; } li.current a, a:visited, a:link { color: white; padding: 5px 5px 3px 5px; font-size: 11px; } This gets close, but it doesn't look quite right. Also you end up with an extra line at the end. I want the lines to be the same height as the text. http://lh5.ggpht.com/_5DxlOp9F12k/S2aFQHfupzI/AAAAAAAAJiY/Ds0IpEyu78I/s800/menu.png

    Read the article

  • How to customize the printing while using Window.print ?

    - by Holicreature
    i want to print a invoice and i use a print.css by media=print and when i change the current stylesheet to print.css i could able to view what i should be printing without the titles and content left aligned. But still while i'm printing there is space in the top and left and its taking up whole a4 sheet and also the whole width of the page.. But i've defined a body width of just 550 px. While i view to print preview, it takes the whole width instead of taking up 1/3 of the width.. My print.css is body { width:550px; height:450px; color:#000000; margin:0; padding:0; word-spacing:1.1pt; font-family : "Times New Roman", Times, serif; font-size : 10px; text-align:left; } a { visibility :hidden; display : none; } input{ display : none; } table { margin: 1px; text-align:left; } #list,#head,#cont,#fotter,#oth,#links,#name,li,ul,ol { display : none; } I'm printing through browser using window.print, so is there any special configuration i need to do...?

    Read the article

  • Reduce white space between lines of text

    - by user654466
    I am creating a webpage (first time) and i'm following as much of the CSS rules and tags as I can. However, I ran into a problem with white space. I've underlined the first line of text but now the second line seems to have drifted below. Is there a way to make it a bit more snug, i'd like the second line of text to be just below the above line. body,td,th { color: #000000; } body { margin: 0; padding: 0; padding-top: 6px; text-align: center; background-color: #FFFFFF; } #centered { width: 800px; /* set to desired width in px or percent */ text-align: left; /* optionally you could use "justified" */ border: 0px; /* Changing this value will add lines around the centered area */ padding: 0; margin: 0 auto; } .style3 { font-size: 32pt; color: #666666; margin-left: 0px; border-bottom: 3px double; } .style5 { margin-left: 390px; font-size: 32pt; color: #CCCCCC; } --> </style></head> <div id="centered"> <body> <p class="style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FIRST LINE OF TEXT</p> <p class="style5">INDENTED SECOND LINE</p> </body> </div> </body> </html>

    Read the article

  • java gui image problem : doesn't display in the background

    - by thegamer
    Hello, i have a query about why is my image not being displayed in my background of my program. I mean i did all the steps necessary and still it would'nt be displayed. The code runs perfectly but without having the image displayed. The directory is written in the good location of the image. I am using java with gui. If anyone could help me solve my problem, i would appreciate :) here is the code below: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class hehe extends JPanel{ public hehe(){ setOpaque(false); setLayout(new FlowLayout()); } public static void main (String args[]){ JFrame win = new JFrame("yooooo"); // it is automaticcally hidden JPanel mainPanel = new JPanel(new BorderLayout()); win.add(mainPanel); JLabel titleLabel = new JLabel("title boss"); titleLabel.setFont(new Font("Arial",Font.BOLD,18)); titleLabel.setForeground(Color.blue); mainPanel.add(titleLabel,BorderLayout.NORTH); win.setSize(382,269); // the dimensions of the image win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); win.setVisible(true); } public void paint(Graphics g) { Image a = Toolkit.getDefaultToolkit().getImage("C:\\Users\\andrea\\Desktop\\Gui\\car"); // car is the name of the image file and is in JPEG g.drawImage(a,0,0,getSize().width,getSize().height,this); super.paint(g); } }

    Read the article

  • How to disable form submit if the username is not available

    - by Rajasekar
    I have checked the user name availability. The problem is, even if the username is not available, the form is posting. Edited Code: <SCRIPT type="text/javascript"> $(document).ready(function(){ $("#emailch").change(function() { var usr = $("#emailch").val(); if(usr.length >= 3) { $("#status").html('<img src="images/loader.gif" align="absmiddle">&nbsp;Checking availability...'); $.ajax({ type: "POST", url: "includes/check.php", data: "username="+ usr, success: function(msg){ $("#status").ajaxComplete(function(event, request, settings){ if(msg == 'OK') { $("#username").removeClass('object_error'); // if necessary $("#username").addClass("object_ok"); $(this).html('&nbsp;<img src="images/tick.gif" align="absmiddle">'); } else { $("#username").removeClass('object_ok'); // if necessary $("#username").addClass("object_error"); $(this).html(msg); } }); } }); } else { $("#status").html('<font color="red">The username should have at least <strong>3</strong> characters.</font>'); $("#username").removeClass('object_ok'); // if necessary $("#username").addClass("object_error"); } }); }); </SCRIPT> What I want is that, the form should not be posted if the user name is not available. I have tried by using return false; in IF CONDITION but it fails. Please suggest any alternate method. Any help will be appreciated.

    Read the article

  • How do I use curl to display a table on a page?

    - by user272899
    I want to use curl to retrieve a table from an external page. So far my code retrieves all data from the page. I have read that using preg_match or preg_replace is the way to go about it. This is my code so far: <?php $ch = curl_init() or die(curl_error()); curl_setopt($ch, CURLOPT_URL,"http://www.megaupload.com/?d=XE30L1GA&w=631&h=392"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data1=curl_exec($ch) or die(curl_error()); echo "<font color=black face=verdana size=3>".$data1."</font>"; echo curl_error($ch); curl_close($ch); ?> This is the data I want to retrieve from the page: <FORM method="POST" id="captchaform"> <INPUT type="hidden" name="captchacode" value="1a589e0a53c54f937eb8"> <INPUT type="hidden" name="megavar" value="bed55b1a7a26e4bb0aa11df4188f58bda6958d72856a637ca55cbda4c24c89b97d52e39e3a2d1d26082273dec61e68416bd929d566cf63cd8441e9f6166d667618060608c5d63c9341e72fc036ea4ed1ec8d099bc488fa1f3c5df7228e10a0f79c4e5fb78fe41f0d9873194c56f94dfbcc008e4a7c8ebc58c8169d42cb98a9a86d8cb6dfbae8791b9dfcf5a3119f7941cc07e9ba48934ad9b5f865cd32e71bf6d3a3954ddc4e75925aaf2c0ec6d1dd884ccc4d299be3e41957a967e68a143af49d6b7ff7b36dac725f20214e58feb32662e09f5840ac76cff67f7d99e67ffb485d72382dd20cece80e4307dfef720a51734d7f9a4a363de0950d3d0e927423642a79b2e68ed177d2ad2d877c1c2052969ec61737749b05864b3a74d241981d6b89"> <TR> <TD>Enter this </TD> <TD width="100" align="center" height="40"><img src="http://wwwq32.megaupload.com/gencap.php?23243f17c2404dd4.gif" border="0" alt=""></TD> <TD> here:</TD> <TD><input type="text" name="captcha" id="captchafield" maxlength="4" style="border:solid 1px; border-color:#C4C4C4; background-color:#F9F9F9; width:50px; height:25px;"></TD> </TR> </FORM>

    Read the article

  • Is it possible to split HTML using DOMDocument?

    - by Lynn Adrianna
    Using DOMDocument, is it possible to split a block of HTML by text wrapped in tags and those that are not, while maintaining the order? Sorry, if this doesn't make sense. My example should make it clear. Let's say I have the following block of HTML: text1<b style="color:pink">text2</b>text3<b>text4</b> <b style="font-weight:bold">text5</b> Is it possible create an array as such: array( [0] => text1 [1] => <b style="color:pink">text2</b> [2] => text3 [3] => <b>text4</b> [4] => [5] => <b style="font-weight:bold">text5</b> ) Below is my current working solution, which uses a regular expression, to split the HTML. $tokens = preg_split('/(<b\b[^>]*>.*?<\/b>)/i', $html, null, PREG_SPLIT_DELIM_CAPTURE); However, I always read that it is a bad idea to parse HTML using regular expressions, so was just wondering if there is a better way.

    Read the article

  • Gradient fills only half the cell

    - by Gopal
    Hi, How do I get the IE gradient function here in this code sample to completely fill the table cell? With the code given below, I could only get it to cover the upper half of the cell. <HTML> <HEAD> <style> <!--table .cl1 { font-family:Comic Sans MS; font-size:11.0pt; color:#800000; border-left:1.5pt solid #000000; border-top:1.5pt solid #000000; border-right:1.5pt solid #000000; border-bottom:1.5pt solid #000000; background-color:#ffffff; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#ffffff', EndColorStr='#99cc00') progid:DXImageTransform.Microsoft.dropshadow(Color='#660000', Positive='true', OffX=0, OffY=0); } --> </style></HEAD> <BODY> <table x:str cellspacing=0 style='table-layout:fixed; border-left:1.0pt solid; border-top:1.0pt solid; border-right:1.0pt solid; border-bottom:1.0pt solid; border-left-color:#c0c0c0; border-top-color:#c0c0c0; border-right-color:#c0c0c0; border-bottom-color:#c0c0c0; '> <col style='width:67pt;'> <tr style='height:28.00pt'> <td class=cl1 style='width:67pt;'>Cell Text</td> </tr> </BODY> </HTML>

    Read the article

  • text-align:justify is not getting applied

    - by vDeepak
    I have added the following code sample in my .html file: <div Class="Frame" Style="left:85.8pt; top:198.5pt; width:415.5pt; height:43pt; position:absolute; background-color:rgb(201,201,201); overflow:hidden; border:0px Solid rgb(0,0,0);"> <p Style="text-align:justify; text-align-last:justify; padding-top:0pt; padding-bottom:0pt;"> <span Style="height:14.4pt; width:415.5pt;" class="ln"> <span Style="font-size:12pt; font-family:F0; word-spacing:5.09135818481445em; letter-spacing:0em; color: rgb(0,0,0);">Sample Text Here</span> </span> </p> </div> But the text-align:justify is not getting applied.

    Read the article

< Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >