Artiom Posted July 3, 2008 Report Share Posted July 3, 2008 Здравствуйте Подскажите пожалуйста как решить проблему. В PHP сценарии пишу: echo"<a onclick='OpenFile(\"form.php?id={$t[id]}\");return false;' href='#' title='Оформить заказ'>$t[vehicle]<a/>"; $t забираю из базы данных MySQL,после $t переносится строка и в этом случае мой JS код который формируется в сценарии умирает. Получается <a onclick='OpenFile("form.php?id=2");return false;' href="#" title="Оформить заказ">75 </a> Очень нужна помощь. Жду ответа. :bye1: Link to comment Share on other sites More sharing options...
Ф@РТОВЫЙ Posted July 3, 2008 Report Share Posted July 3, 2008 $t['id'] = str_replace("\r", "", str_replace("\n", "", "{$t['id']}"));echo "<a onclick='OpenFile(\"form.php?id={$t['id']}\");return false;' href='#' title='Оформить заказ'>{$t['vehicle']}<a/>"; Link to comment Share on other sites More sharing options...
Artiom Posted July 4, 2008 Author Report Share Posted July 4, 2008 Пасибочки, помог. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now