Search Results

Search found 11 results on 1 pages for 'liso22'.

Page 1/1 | 1 

  • Image through Script, How to add variable to URL

    - by Liso22
    I'm sure it's pretty straightforward since someone just solved a similar problem I had. I have a folder full of city images and need users to see the image corresponding to their city. Right now I'm getting the users location without problem using "geoip_city()" but I don't quite know how to integrate it into the URL of the image. All images have the following format: New York.jpg, Boston.jpg so I just need to make the script put the location before .jpg This is what I'm trying now: <img src="blank.png" id="image" > <script type="text/javascript"> document.getElementById('image').src = "Imagenes/grupos/' + geoip_city() + '.jpg"; </script> I believe I'm just messing with the quotes or something similar. Could anyone tell me what I'm doing wrong? Also this is where I'm testing it: http://chusmix.com/?page_id=1770 Thanks

    Read the article

  • Can't make HREF change based on PHP value

    - by Liso22
    I want to retrieve the user's location and then show a link that points to an URL that changes according to that location. I just want to place the user's city name at the end of the HREF. I need this work on my wordpress site, on a static page. I use a plugin called Exec-php which let's me run PHP in pages. I have a plugin that provides me the user's city through the shortcode "[mmjs-city]". I tried to make it work through different paths but I never get the link to work. Here I tried assigning that shortcode to a value, <?php $city= "[mmjs-city]"; echo $city; echo "<a href='?s=" . $city ."'>Search for your city</a>"; ?> I added the first two lines to check whether the shortcode is working or not and if it's correctly assinged to the value $city. That part works. Then it creates the link and put's the value $city at the end of it. But when trying it instead of taking me to: /?s=new+york It takes me to: /?s=%3Cscript%20language=%22javascript%22%3Edocument.write(geoip_city());%3C/script%3E I have no idea what to do. I would be really thankful for any info on how to make it work, it's really an important feature for my site. Please ask for any further info or idk anything. Also this is where I tested that code: http://chusmix.com/?page_id=1129 Thanks

    Read the article

  • Can't get Facebook's user photos with php

    - by Liso22
    I'm trying to get the user photos, but I cannot get the user's photos data. I'm trying this: $photos = $facebook->api('https://graph.facebook.com/'.$profileFID.'/photos?access_token='.$access_token); print_r($photos); I'm sure the URL is correct since pasting it in the browser shows the photos array. However when I try to print the array to check if I got it I get only this: ( [id] => https://graph.facebook.com/1409006586/photos ) How can I get the full array with the user photos?

    Read the article

  • Why is my condition onsubmit not returning false?

    - by Liso22
    After asking a couple of questions I managed to create this form. I didn't have troubles making it return false if the submitted value was 0 but I cannot make it return false when it's the string 'Cambia de ciudad". I'm sure I'm messing with the quotes or something like that. This is the form: <form role="search" method="get" action="http://chusmix.com/" onsubmit="if (document.getElementById('s')== 'Cambiá de ciudad") return false;'> <input class="ubicacion" name="s" id="s" tabindex="1" onsubmit="if ((document.getElementById('s').value.length < 4) || (document.getElementById('s')== 'Cambiá de ciudad')) return false;" onfocus="if (this.value=='Cambiá de ciudad') this.value = ''" onblur="if(this.value == '') this.value = 'Cambiá de ciudad'" type="text" maxlength="80" size="28" value="Cambiá de ciudad"> <input type="submit" id="searchsubmit" value="Buscar" /> </form> How do I make it work? Thanks

    Read the article

  • Form Field: How do I change the background on blur?

    - by Liso22
    I managed to remove the background when the user clicks on the field but I cannot restore it when it blurs! This is the field: <textarea class="question-box" style="width: 240px; background: white url('http://chusmix.com/Imagenes/contawidget.png') no-repeat 50% 50%; color: grey;" cols="12" rows="5" id="question-box-' . $questionformid . '" name="title" onblur="if(this.value == '') { this.style.color='#848484'; this.value=''this.style.background=' white url('http://chusmix.com/Imagenes/contawidget.png') no-repeat 50% 50%;e';}" onfocus="if (this.value == '') {this.style.color='#444'; this.style.background='none';}" type="text" maxlength="200" size="28"></textarea> Anyone knows what I'm doing wrong?? Thanks

    Read the article

  • Make a shortcode echo in the middle of an URL in HREF

    - by Liso22
    The shortcode [mmjs-city] echoes the city the user is in. I want to make a link that takes the user to a results page with the user's city as search term. Basically the URL should be the results page URL + the result of the shortcode (the city). I tried to write it this way: Search for your city Normally I would just use PHP and assign the city to a value but I'm in a page not the theme and PHP doesn't work on pages for some reason, most likely It's possible but I don't know how. Anyway, anybody knows how could I do it? Thanks and merry christmas

    Read the article

  • Equivalent to produce field glow in other browsers?

    - by Liso22
    I was long using this to add a glow to focused fields, I accessed my page from Firefox for the first time and realized it doesn't work on it, and most likely not on explorer either. border: 1px solid #E68D29; outline-color: -webkit-focus-ring-color; outline-offset: -2px; outline-style: auto; outline-width: 5px; I had copy pasted it from another page so I'm not quite sure how it works. What is the equivalent for Firefox or Explorer? I mean how do I make a similar glow in other browsers? Thanks

    Read the article

  • Make form redirect users after posting

    - by Liso22
    I need to change a form so that instead of reloading the page after submitting it, it redirects the user to another page, this is the form: <form class="questionform" name="questionform-0" id="questionform-0"> <textarea class="question-box" cols="12" rows="5" id="question-box-' . $questionformid . '" name="title" type="text" maxlength="200" size="28"></textarea> <input type="text" class="ubicacion" value="" name="question"> <input type="button" name="ask" value="Publicar" onclick="askquestion('questionform-0'); window.location.reload(true);"> I want to remove the window.location.reload and change it for a redirect that sends users to the page their comment will appear. Which is: www.chusmix.com/s?= (the content of the second field) The problem is that the content of the second field is part of the url I want to redirect, it's not simply always the same URL. So I have no idea how to do it. How do I do it? Anyway thanks for any info or whatever that points me on the right direction. Thanks

    Read the article

  • How to add ucwords and strtolower to this form

    - by Liso22
    I want "s.value" to be turned all to lowercase and then ucwords to it but I don't know how to do it since it's inside a form. Basically I want to do something like this: ucwords(strtolower( s.value here )); This is the form: <form role="search" method="get" id="searchform" action="http://chusmix.com/?s=" onsubmit="if (document.getElementById('s2').value.length > 5) window.location = action + '<php echo $city; ?>++++' + s.value; return false;" > Thanks

    Read the article

  • How do I modify a string printed by a script?

    - by Liso22
    I'm having problems with wordpress mishandling accented characters, or maybe the problem is with some plugin. Whichever the case I need to "translate" some strings, removing accents which i do with: $value = strtr($value, $trans); I really need to change this string which renders the user's location but it's printed with a script so I have no idea how to do it: <script language="javascript"> document.write('' + geoip_city() +''); </script> Is there a way to assign it's result to a php value beforehand or something? Maybe removing the accents with a script. I really need to modify it, how could I manage to do it? Thanks

    Read the article

  • Problem with onsubmit ID

    - by Liso22
    I need an onsubmit to return false if what's written on the first field is a certain PHP value however the field has a strange id format and I'm not quite sure how to add it in the onsubmit. This is the form, I didn't add the element ID to it: <form class="questionform" name="questionform-0" id="questionform-0" onsubmit="if (document.getElementById('').value == '<?php echo $casi; ?>') return false;" > <textarea class="question-box" style="width:97%;" cols="20" rows="4" id="question-box-' . $questionformid . '" name="title" type="text" maxlength="80" size="28" value=""></textarea> I tried many times but couldn't add it. How should I do it? Thanks

    Read the article

1